:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  background: #f4f6f8;
  color: #17191f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input {
  font: inherit;
}

.diagnostic-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.diagnostic-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #dfe3e8;
}

.eyebrow,
.diagnostic-header h1,
.verdict p {
  margin: 0;
}

.eyebrow {
  color: #697080;
  font-size: 13px;
  font-weight: 750;
}

.diagnostic-header h1 {
  margin-top: 7px;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.diagnostic-header a {
  color: #4f49dd;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.diagnostic-header a:hover {
  text-decoration: underline;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
}

.status-band > div {
  min-width: 0;
  padding: 18px 20px;
}

.status-band > div:not(:last-child) {
  border-right: 1px solid #e7eaee;
}

.status-band span,
.result-column header span {
  display: block;
  color: #7a8290;
  font-size: 12px;
  font-weight: 700;
}

.status-band strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-band .ready {
  color: #167a58;
}

.query-form {
  margin-top: 34px;
}

.query-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 750;
}

.query-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  gap: 10px;
}

.query-row input {
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  border: 1px solid #cfd4dc;
  border-radius: 6px;
  outline: none;
  background: #fff;
}

.query-row input:focus {
  border-color: #5952ff;
  box-shadow: 0 0 0 3px rgba(89, 82, 255, 0.12);
}

.query-row button {
  height: 48px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #5952ff;
  font-weight: 750;
  cursor: pointer;
}

.query-row button:hover {
  background: #4942ec;
}

.query-row button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.verdict {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid #dce2e7;
  border-radius: 8px;
  background: #fff;
}

.verdict-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: #9299a6;
}

.verdict.success {
  border-color: rgba(22, 122, 88, 0.28);
  background: #f5fbf8;
}

.verdict.success .verdict-dot {
  background: #167a58;
  box-shadow: 0 0 0 5px rgba(22, 122, 88, 0.1);
}

.verdict.error {
  border-color: rgba(196, 55, 71, 0.28);
  background: #fff8f8;
}

.verdict.error .verdict-dot {
  background: #c43747;
}

.verdict strong {
  font-size: 15px;
}

.verdict p {
  margin-top: 4px;
  color: #697080;
  font-size: 13px;
  line-height: 1.55;
}

.comparison {
  margin-top: 22px;
}

.result-column {
  min-width: 0;
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.vector-column {
  border-color: rgba(89, 82, 255, 0.32);
}

.result-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
  border-bottom: 1px solid #e7eaee;
}

.result-column h2 {
  margin: 4px 0 0;
  font-size: 18px;
  letter-spacing: 0;
}

.result-column > header > strong {
  color: #697080;
  font-size: 13px;
}

.result-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  padding: 18px 19px;
}

.result-list li + li {
  border-top: 1px solid #edf0f3;
}

.result-rank {
  color: #9299a6;
  font-size: 11px;
  font-weight: 800;
}

.result-title {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.4;
}

.result-source {
  margin: 6px 0 0;
  color: #4f49dd;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.result-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin: 10px 0 0;
  color: #697080;
  font-size: 12px;
}

.result-content {
  display: -webkit-box;
  margin: 11px 0 0;
  overflow: hidden;
  color: #4f5663;
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.empty-result {
  color: #9299a6;
  font-size: 13px;
}

@media (max-width: 760px) {
  .diagnostic-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 22px;
  }

  .diagnostic-header {
    align-items: flex-start;
  }

  .diagnostic-header h1 {
    font-size: 25px;
  }

  .status-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-band > div:nth-child(2) {
    border-right: 0;
  }

  .status-band > div:nth-child(-n + 2) {
    border-bottom: 1px solid #e7eaee;
  }

  .query-row {
    grid-template-columns: 1fr;
  }

  .query-row button {
    width: 100%;
  }
}
