/* ─────────────────────────────────────────────────────────────────
   css/board-health.css

   Board Health Coach (js/builder/board-health.js, 2026-06-12).
   QUIET BY DESIGN (the a11y-overlay pill lesson): a slim muted chip
   next to the tile count in the board header — no floating pill, no
   popup. The chip only exists when there are findings; tip-only
   chips stay muted, a 'warn' finding tints it amber.
   ───────────────────────────────────────────────────────────────── */

.board-health-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  margin-left: 0.5rem;
  padding: 0.1rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.board-health-chip:hover,
.board-health-chip:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}
/* A 'warn' finding (silent tile / dead drill) tints the chip amber —
   still small, still quiet, just no longer invisible. */
.board-health-chip--warn {
  color: #5b3a00;
  background: #ffe9b8;
  border-color: #e8c468;
}

/* ── Anchored panel ─────────────────────────────────────────────── */
.board-health-panel {
  position: fixed;
  z-index: 1200; /* above the tablet frame, below modal overlays (2000s) */
  min-width: 260px;
  max-width: 360px;
  max-height: 50vh;
  overflow-y: auto;
  background: var(--surface,#fff);
  border: 1px solid #e0e3ee;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(30, 40, 90, 0.18);
  padding: 0.4rem 0.5rem 0.5rem;
  font-size: 0.8rem;
  color:var(--ink);
}

.board-health-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0.25rem 0.4rem;
  border-bottom: 1px solid #eef0f6;
}
.board-health-title {
  font-weight: 700;
  font-size: 0.8rem;
}
.board-health-dismiss {
  font-size: 0.68rem;
  color:var(--ink-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.1rem 0.2rem;
}
.board-health-dismiss:hover { color:var(--ink); }

.board-health-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.25rem;
  border-bottom: 1px solid #f3f4f9;
}
.board-health-item:last-child { border-bottom: none; }
.board-health-item-msg {
  flex: 1;
  line-height: 1.35;
}
/* Tips stay muted; warns read as ink (the message itself explains). */
.board-health-item--tip .board-health-item-msg { color:var(--ink-muted); }
.board-health-item--warn .board-health-item-msg { color: #7a4a00; }

.board-health-fix {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #c9d2f0;
  background: #f4f6ff;
  color: #3c48a0;
  cursor: pointer;
  white-space: nowrap;
}
.board-health-fix:hover { background: #e8ecff; }
