:root {
  color: #182024;
  background: #f4f6f7;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f6f7;
}

.topbar,
main,
footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d7dde0;
}

.eyebrow {
  margin: 0 0 6px;
  color: #547078;
  font-size: 13px;
  overflow-wrap: anywhere;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
}

.overall-badge,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 700;
}

.overall-badge {
  min-width: 100px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.overall-badge.idle,
.status.pending {
  color: #5d6870;
  background: #e8ecee;
}

.overall-badge.running {
  color: #0d5368;
  background: #dceff5;
}

.overall-badge.pass,
.status.pass {
  color: #17623a;
  background: #dff2e7;
}

.overall-badge.fail,
.status.fail {
  color: #8d2525;
  background: #f7e0e0;
}

main {
  padding: 26px 0 34px;
}

.route-band {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  background: #1f2d32;
  color: #f8fbfc;
  border-radius: 6px;
}

.route-node {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.route-index {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #dbeef1;
  color: #18343a;
  border-radius: 50%;
  font-size: 13px;
}

.route-arrow {
  color: #91aeb6;
  font-size: 24px;
}

.toolbar,
.section-heading,
.waf-block,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.toolbar {
  padding: 22px 0;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: #5c686d;
  font-size: 14px;
}

.summary strong {
  color: #182024;
  font-size: 18px;
}

button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.primary-button {
  color: #fff;
  background: #146b78;
}

.primary-button:hover:not(:disabled) {
  background: #105a65;
}

.secondary-button {
  color: #24343a;
  background: #fff;
  border-color: #b8c4c8;
}

.secondary-button:hover:not(:disabled) {
  background: #eef2f3;
}

.section-block {
  padding: 24px 0;
  border-top: 1px solid #d7dde0;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading > span {
  color: #68757a;
  font-size: 13px;
  overflow-wrap: anywhere;
  text-align: right;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid #d2d9dc;
  border-radius: 6px;
  background: #fff;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 13px 15px;
  border-bottom: 1px solid #e2e7e9;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #58656a;
  background: #f8f9fa;
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

th:nth-child(1) { width: 26%; }
th:nth-child(2) { width: 14%; }
th:nth-child(3) { width: 12%; }
th:nth-child(4) { width: 48%; }

.status {
  min-width: 54px;
  height: 25px;
  padding: 0 9px;
  font-size: 12px;
}

.test-detail {
  color: #56656a;
  overflow-wrap: anywhere;
}

.observation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid #d2d9dc;
  background: #d2d9dc;
  border-radius: 6px;
  overflow: hidden;
}

.observation-grid > div {
  min-width: 0;
  min-height: 92px;
  padding: 16px;
  background: #fff;
}

dt {
  margin-bottom: 9px;
  color: #66747a;
  font-size: 12px;
}

dd {
  margin: 0;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.waf-block p {
  margin: 8px 0 0;
  color: #657277;
  font-size: 14px;
}

.waf-block p.blocked {
  color: #8a5512;
}

.waf-block p.reached {
  color: #17623a;
}

footer {
  min-height: 66px;
  border-top: 1px solid #d7dde0;
  color: #6b777c;
  font-size: 12px;
}

@media (max-width: 720px) {
  .topbar,
  main,
  footer {
    width: min(100% - 24px, 1120px);
  }

  .topbar {
    min-height: 104px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    padding: 18px 0;
  }

  .overall-badge {
    align-self: flex-start;
  }

  h1 {
    font-size: 23px;
  }

  .route-band {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .route-arrow {
    display: none;
  }

  .toolbar,
  .waf-block {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .observation-grid {
    grid-template-columns: 1fr;
  }

  footer {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
