/* Keep colors in sync with the chart constants in app.py */
:root {
  --page: #f2f4f3;
  --surface: #ffffff;
  --line: rgba(11, 11, 11, 0.08);
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #7f7e78;
  --accent: #0f766e;
  --accent-soft: #e6f4f1;
  --pass: #0a8a0a;
  --fail: #c63434;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

body {
  background: var(--page);
  color: var(--ink);
  margin: 0;
}

/* Header and sidebar */

.header,
.navbar {
  background: var(--surface);
  border-color: var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #ffffff;
  flex: none;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
}

.brand-sub,
.side-hint,
.card-hint {
  font-size: 12px;
  color: var(--muted);
}

.side-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-2);
}

.gate-label {
  font-size: 13px;
  font-weight: 600;
}

.gate-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

.gate-slider {
  margin: 8px 4px 4px;
}

/* Page */

.main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main,
.mantine-Grid-col {
  min-width: 0;
}

.headline {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.subline {
  font-size: 15px;
  color: var(--ink-2);
  margin: 4px 0 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  height: 100%;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.graph {
  height: 360px;
}

.foot {
  font-size: 12px;
  color: var(--muted);
}

/* Candidate cards */

.cands {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.cand {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: border-color 120ms;
}

.cand:hover {
  border-color: rgba(15, 118, 110, 0.45);
}

.cand.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.card-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.cid,
.cmp-id {
  font-family: var(--mono);
}

.score {
  font-weight: 800;
  color: var(--ink-2);
}

.thumb {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin: 4px 0;
}

.note {
  font-size: 12px;
  color: var(--muted);
}

.note.ok {
  color: var(--pass);
  font-weight: 600;
}

/* Selected compound */

.cmp-id {
  font-size: 20px;
  font-weight: 500;
}

.verdict {
  text-transform: none;
}

.structure {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: contain;
  margin: 8px 0 12px;
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.check-icon.pass,
.check-value.pass {
  color: var(--pass);
}

.check-icon.fail,
.check-value.fail {
  color: var(--fail);
}

.check-icon.untested,
.check-value.untested {
  color: var(--muted);
}

.check-value {
  font-weight: 700;
  text-align: right;
}

.check-bar {
  font-size: 12px;
  color: var(--muted);
  min-width: 96px;
  text-align: right;
}

@media (max-width: 640px) {
  .main {
    padding: 16px;
  }

  .headline {
    font-size: 22px;
  }
}
