/* ===========================================================
   brain.css — the case brain panel.

   THE ROW IS THE WHOLE DESIGN. A proposal has to be decidable at
   a glance: the term, what kind of thing it is, how much evidence
   sits behind it, and two buttons. Everything else is secondary
   and is styled to stay that way.

   CONFIRM IS NOT A DANGEROUS ACTION and must not look like one.
   The green is quiet. Reject is quieter still — a reviewer who
   feels they are destroying something will leave fifty proposals
   sitting there, and a brain full of unconfirmed guesses is the
   same as no brain with extra steps.

   ERASE is the only thing here wearing a warning colour, because
   it is the only thing that cannot be undone.
   =========================================================== */

.br-actions {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 18px 0 6px;
}
.br-actions .br-danger {
  margin-left: auto;
  border-color: color-mix(in srgb, var(--danger, #c1503e) 40%, transparent);
  color: color-mix(in srgb, var(--danger, #c1503e) 90%, white);
}
.br-actions .br-danger:hover {
  background: color-mix(in srgb, var(--danger, #c1503e) 14%, transparent);
}

.br-note-off { opacity: .8; }

/* ---- sections ---- */
.br-sec { margin-top: 26px; }

.br-sechead {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 8px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line, #252d38);
}
.br-sechead h2 {
  margin: 0; font-size: 15px; font-weight: 600;
  letter-spacing: .01em; color: var(--text-1, #e8e6e1);
}
.br-sechead > span {
  font-size: 12px; font-variant-numeric: tabular-nums;
  color: var(--text-3, #8c94a2);
}
.br-toggle {
  margin-left: auto; background: none; border: 0; padding: 0;
  font: inherit; font-size: 12px; cursor: pointer;
  color: var(--text-3, #8c94a2);
  text-decoration: underline; text-underline-offset: 3px;
}
.br-toggle:hover { color: var(--text-1, #e8e6e1); }

.br-hint, .br-empty {
  margin: 10px 0 14px;
  font-size: 12.5px; line-height: 1.6;
  color: var(--text-3, #8c94a2);
}
.br-empty { font-style: italic; }

/* ---- the row ---- */
.br-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line, #252d38);
  border-radius: 8px;
  background: var(--surface-2, #151a21);
  margin-bottom: 8px;
}
.br-row.is-decided { background: transparent; border-style: dashed; }

.br-main { flex: 1 1 auto; min-width: 0; }

.br-term {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 14px;
}
.br-term b {
  font-weight: 600; color: var(--text-1, #e8e6e1);
  /* Monospace, because these are literal strings from the
     evidence and a reader needs to see the exact characters. */
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
}
.br-canon { font-size: 12.5px; color: var(--text-2, #b3bac6); }

.br-kind {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  border: 1px solid transparent;
}
.br-sig { color: #7fb08a; border-color: color-mix(in srgb, #7fb08a 34%, transparent); }
.br-noi { color: #8c94a2; border-color: color-mix(in srgb, #8c94a2 30%, transparent); }
.br-ali { color: #c9a962; border-color: color-mix(in srgb, #c9a962 34%, transparent); }
.br-cou { color: #9db4d8; border-color: color-mix(in srgb, #9db4d8 34%, transparent); }

.br-meta {
  margin-top: 4px;
  font-size: 11.5px; line-height: 1.5;
  color: var(--text-3, #8c94a2);
}

/* How much evidence sits behind it, as a length rather than a
   number — a weight of 1.94 means nothing to a reviewer. */
.br-bar {
  margin-top: 7px; height: 3px; border-radius: 2px;
  background: color-mix(in srgb, var(--text-3, #8c94a2) 18%, transparent);
  max-width: 220px; overflow: hidden;
}
.br-bar span {
  display: block; height: 100%; border-radius: 2px;
  background: color-mix(in srgb, #7fb08a 65%, transparent);
}

.br-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.br-why {
  background: none; border: 0; padding: 0;
  font: inherit; font-size: 12px; cursor: pointer;
  color: var(--text-3, #8c94a2);
  text-decoration: underline; text-underline-offset: 3px;
}
.br-why:hover { color: var(--text-1, #e8e6e1); }

.br-act {
  font: inherit; font-size: 12.5px; cursor: pointer;
  padding: 6px 14px; border-radius: 6px;
  border: 1px solid var(--line-2, #333d4b);
  background: transparent; color: var(--text-2, #b3bac6);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
/* Confirming is the ordinary action and is styled as one. */
.br-yes {
  border-color: color-mix(in srgb, #7fb08a 45%, transparent);
  color: #7fb08a;
}
.br-yes:hover { background: color-mix(in srgb, #7fb08a 14%, transparent); }
.br-no:hover, .br-forget:hover {
  background: color-mix(in srgb, var(--text-3, #8c94a2) 12%, transparent);
  color: var(--text-1, #e8e6e1);
}

/* ---- the evidence ---- */
.br-ev {
  margin: -4px 0 12px 14px;
  padding: 9px 12px;
  border-left: 2px solid color-mix(in srgb, #7fb08a 40%, transparent);
  font-size: 12px; line-height: 1.7;
  color: var(--text-3, #8c94a2);
}
.br-ev span {
  display: inline-block;
  margin: 0 6px 0 0; padding: 1px 7px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--text-3, #8c94a2) 12%, transparent);
  color: var(--text-2, #b3bac6);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
}

@media (max-width: 720px) {
  .br-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .br-side { justify-content: flex-end; }
  .br-actions .br-danger { margin-left: 0; }
}

/* What the brain has read so far (js/brainview.js). */
.br-progress {
  margin: 0 0 18px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; line-height: 1.6; color: var(--text-2);
}
.br-progress b { color: var(--text); font-weight: 600; }
.br-progress .br-when { color: var(--text-3); }
.br-progress.br-full { color: var(--red); border-color: rgba(224,122,112,.4); }
/* Learned from the answers people confirm (js/brainfeedback.js) */
.br-fin { color: #8fce9f; border-color: color-mix(in srgb, #8fce9f 34%, transparent); }
.br-cor { color: #e0aa5e; border-color: color-mix(in srgb, #e0aa5e 34%, transparent); }
.br-quote { margin-top: 4px; font-style: italic; color: var(--text-2); }
