:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202938;
  background: #f6f7f9;
  font-synthesis: none;
  --muted: #687386;
  --line: #e3e7ed;
  --blue: #315ee8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #98b1ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
main {
  max-width: 1220px;
  margin: auto;
  padding: 0 44px;
}
.masthead {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: #202938;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.8px;
}
.mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  font-size: 25px;
}
.divider {
  color: #c1c8d3;
  font-weight: 400;
  margin: 0 4px;
}
.brand-sub {
  color: var(--muted);
  font-weight: 450;
  font-size: 17px;
  letter-spacing: -0.3px;
}
.quiet {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px;
}
.quiet:hover {
  background: #e9edf3;
  color: #202938;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--muted);
}
h1 {
  font-size: 40px;
  letter-spacing: -1.6px;
  font-weight: 650;
  margin: 10px 0;
}
p {
  line-height: 1.6;
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 42px 0 32px;
  gap: 24px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: #30a478;
  border-radius: 50%;
}
.dot.offline {
  background: #bf7c2e;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  margin-bottom: 30px;
  padding: 24px 0;
}
.stats > div {
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-right: 1px solid var(--line);
}
.stats > div:last-child {
  border: 0;
}
.stat-label {
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 650;
  color: var(--muted);
}
.stats strong {
  font-size: 30px;
  font-weight: 550;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.stats > div:last-child strong {
  color: #a77020;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}
.tabs {
  display: flex;
  gap: 4px;
}
.tabs button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 9px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.tabs button[aria-pressed="true"] {
  color: #254fcd;
  background: #e8eefd;
}
.search-controls {
  display: flex;
  gap: 8px;
}
input,
select {
  border: 1px solid #dbe1e9;
  background: white;
  border-radius: 7px;
  padding: 10px 12px;
  color: #364154;
  font-size: 12px;
  min-width: 0;
}
input::placeholder {
  color: #8992a3;
}
#search {
  width: 180px;
}
.table-head,
.row {
  display: grid;
  grid-template-columns: 95px minmax(0, 1fr) 140px 160px 14px;
  gap: 22px;
  align-items: center;
}
.table-head {
  padding: 0 20px 12px;
  font-size: 9px;
  letter-spacing: 1px;
  color: #8992a3;
  font-weight: 650;
}
.rows {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.rows:empty {
  display: none;
}
.row {
  width: 100%;
  border: 0;
  background: white;
  text-align: left;
  padding: 22px 20px;
  border-bottom: 1px solid #edf0f4;
  color: inherit;
}
.row:last-child {
  border: 0;
}
.row:hover {
  background: #fafbfe;
}
.time {
  font-size: 12px;
  color: #465164;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.time small {
  display: block;
  font-size: 10px;
  color: #8992a3;
}
.transcript {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.destination {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #526077;
}
.destination small {
  font-size: 10px;
  color: #8992a3;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  padding: 5px 8px;
  border-radius: 5px;
  background: #eff2f6;
  color: #657084;
}
.badge.good {
  background: #eaf6f0;
  color: #267650;
}
.badge.bad {
  background: #fceded;
  color: #b44747;
}
.badge.warn {
  background: #fff5e4;
  color: #966720;
}
.badge.running {
  background: #eaf0ff;
  color: #365fc9;
}
.arrow {
  color: #a6aebc;
  font-size: 18px;
}
.result-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.result-cell small {
  font-size: 10px;
  color: #8992a3;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 40px;
  color: #8992a3;
  font-size: 10px;
}
.empty {
  text-align: center;
  border: 1px dashed #d9dfe8;
  border-radius: 12px;
  padding: 65px 20px;
}
.empty-icon {
  font-size: 34px;
  color: #9aa8c0;
}
.empty h2 {
  font-size: 17px;
  font-weight: 550;
  margin: 16px 0 8px;
}
.error {
  color: #af4242;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 12px 0;
}
.login {
  max-width: 380px;
  margin: 100px auto;
}
.login h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin: 15px 0;
}
.login form {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}
.login label {
  font-size: 12px;
  font-weight: 550;
}
.login input {
  font-size: 16px;
  padding: 13px;
}
.primary {
  border: 0;
  background: var(--blue);
  color: white;
  border-radius: 8px;
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 550;
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.primary:hover {
  background: #254dc8;
}
.initial-status {
  text-align: center;
  padding: 80px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
dialog {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  width: 640px;
  max-width: 100vw;
  background: #f8f9fb;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 30px 35px;
  color: inherit;
  overflow-y: auto;
  box-shadow: -10px 0 70px #1c293326;
}
dialog::backdrop {
  background: #1b25394d;
}
.detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
#detail-body h2 {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 550;
  letter-spacing: -0.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 18px 0;
}
.detail-meta {
  color: var(--muted);
  font-size: 11px;
  margin: 14px 0 25px;
}
.section-title {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 28px 0 12px;
  font-weight: 650;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 17px;
  margin: 10px 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.card-title {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 10px;
}
.card p {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.card .line {
  margin: 5px 0;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.card .muted {
  color: var(--muted);
}
pre {
  font:
    11px/1.7 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #526077;
  margin: 12px 0 0;
}
details {
  margin-top: 12px;
}
summary {
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
}
.trace-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.trace-row:last-child {
  border: 0;
}
.trace-name {
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.trace-row small {
  display: block;
  color: #8992a3;
  font-size: 10px;
  margin-top: 4px;
}
.trace-status {
  color: #27835b;
}
.trace-status.failed {
  color: #bb4848;
}
.trace-time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  padding-top: 3px;
}
.probability-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 12px;
  color: var(--muted);
}
.probability-row.selected {
  color: #244fcd;
  font-weight: 600;
}
.warning-box {
  background: #fff6e6;
  border: 1px solid #efdcb8;
  color: #845c25;
  border-radius: 9px;
  padding: 15px;
  font-size: 12px;
  line-height: 1.6;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.error-box {
  background: #fceeee;
  border-color: #efd1d1;
  color: #a33d3d;
}
.detail-subtitle {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
@media (max-width: 900px) {
  main {
    padding: 0 24px;
  }
  .table-head,
  .row {
    grid-template-columns: 80px minmax(0, 1fr) 115px 120px 12px;
    gap: 14px;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .search-controls input {
    flex: 1;
  }
  #search {
    width: auto;
  }
  .search-controls select {
    width: 160px;
  }
}
@media (max-width: 600px) {
  main {
    padding: 0 18px;
  }
  .masthead {
    height: 72px;
  }
  .page-heading {
    padding: 30px 0 24px;
    display: block;
  }
  h1 {
    font-size: 34px;
  }
  .connection {
    margin-top: 18px;
  }
  .stats {
    padding: 18px 0;
    margin-bottom: 22px;
  }
  .stats > div {
    padding: 0 14px;
    gap: 10px;
  }
  .stat-label {
    font-size: 8px;
    letter-spacing: 0.6px;
  }
  .stats strong {
    font-size: 26px;
  }
  .tabs {
    gap: 1px;
  }
  .tabs button {
    padding: 9px 10px;
    font-size: 11px;
  }
  .table-head {
    display: none;
  }
  .row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 18px;
  }
  .row .time {
    grid-column: 1;
    grid-row: 1;
    font-size: 10px;
    color: #8992a3;
  }
  .row .time small {
    display: inline;
    margin-left: 6px;
  }
  .row .transcript {
    grid-column: 1/3;
    grid-row: 2;
    font-size: 14px;
    -webkit-line-clamp: 3;
  }
  .row .destination {
    grid-column: 1;
    grid-row: 3;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 11px;
  }
  .row .destination small {
    font-size: 9px;
  }
  .row .result-cell {
    grid-column: 2;
    grid-row: 3;
    align-items: flex-end;
  }
  .row .result-cell > small {
    display: none;
  }
  .row .arrow {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-size: 16px;
  }
  footer {
    font-size: 9px;
    line-height: 1.5;
    flex-direction: column;
    gap: 3px;
  }
  .login {
    margin: 70px auto;
  }
  dialog {
    padding: 0 20px 30px;
  }
  #detail-body h2 {
    font-size: 20px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background 0.12s ease;
  }
}
