:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #f6f7f9;
  color: #1e2329;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid #9aa4b2;
  border-radius: 4px;
  background: #ffffff;
  color: #1e2329;
  cursor: pointer;
  min-height: 34px;
  padding: 6px 10px;
}

button:hover {
  background: #eef2f7;
}

button:disabled {
  color: #8a94a3;
  cursor: not-allowed;
}

input,
select,
textarea {
  border: 1px solid #aeb7c4;
  border-radius: 4px;
  background: #ffffff;
  color: #1e2329;
  min-height: 34px;
  padding: 6px 8px;
}

textarea {
  display: block;
  resize: vertical;
  width: 100%;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 20px;
}

.topbar,
.toolbar,
.panel {
  background: #ffffff;
  border: 1px solid #d6dce5;
  border-radius: 6px;
  margin-bottom: 14px;
  padding: 14px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  font-weight: 700;
}

h2 {
  font-size: 16px;
}

.status-text,
.muted {
  color: #687386;
  font-size: 13px;
  margin-top: 5px;
}

.api-controls,
.toolbar,
.panel-header,
.button-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.api-controls input {
  min-width: 250px;
}

.toolbar {
  justify-content: space-between;
}

.toolbar select {
  min-width: 260px;
}

.summary {
  display: flex;
  gap: 12px;
  margin: 0;
}

.summary div {
  min-width: 96px;
}

.summary dt {
  color: #687386;
  font-size: 12px;
}

.summary dd {
  font-size: 18px;
  font-weight: 700;
  margin: 2px 0 0;
}

.panel-header {
  justify-content: space-between;
  margin-bottom: 10px;
}

.result-panel {
  background: #f1f4f8;
  border: 1px solid #d6dce5;
  border-radius: 4px;
  color: #27313d;
  min-height: 42px;
  overflow: auto;
  padding: 8px;
}

.result-panel p {
  margin: 0;
}

.result-error {
  color: #8a1f17;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 1120px;
  width: 100%;
}

.result-table {
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid #e2e7ee;
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #4d5969;
  font-size: 12px;
  text-transform: uppercase;
}

.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
}

.note-type {
  font-weight: 700;
  line-height: 1.3;
  max-width: 180px;
}

.analysis-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
  padding: 3px 8px;
}

.analysis-supported {
  background: #dff4e8;
  color: #155c36;
}

.analysis-investigation,
.analysis-limited,
.analysis-unknown {
  background: #fff1c7;
  color: #775500;
}

.analysis-unsupported {
  background: #ffe0df;
  color: #8a1f17;
}

.analysis-list {
  display: grid;
  gap: 3px;
  margin: 0;
  min-width: 160px;
}

.analysis-list div {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(78px, max-content) minmax(64px, 1fr);
}

.analysis-list dt {
  color: #687386;
  font-size: 12px;
}

.analysis-list dd {
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.result-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
}

.result-added,
.result-would_add {
  background: #dff4e8;
  color: #155c36;
}

.result-already_present,
.result-would_already_be_present {
  background: #e8ebf0;
  color: #4f5a68;
}

.result-needs_attention,
.result-would_need_attention {
  background: #ffe0df;
  color: #8a1f17;
}

.status-available {
  background: #dff4e8;
  color: #155c36;
}

.status-pending_retrieval {
  background: #fff1c7;
  color: #775500;
}

.status-needs_attention {
  background: #ffe0df;
  color: #8a1f17;
}

.status-closed {
  background: #e8ebf0;
  color: #4f5a68;
}

@media (max-width: 760px) {
  .topbar,
  .toolbar,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .api-controls,
  .button-row {
    align-items: stretch;
  }

  .api-controls input,
  .toolbar select {
    min-width: 0;
    width: 100%;
  }

  .summary {
    width: 100%;
  }
}
