/* Dealer MPI sheet in myKaarma's light colors, toned down (off-white, softer red/yellow/green).
   Every color is a variable here; also set on body.mk so pills outside a sheet share them. */
.mpi, body.mk {
  --mpi-bg: #fafafa; --mpi-text: #33373d; --mpi-muted: #7a8088; --mpi-line: #e4e6e9; --mpi-frame: #d5d8dc;
  --mpi-red: #b8343c; --mpi-yellow: #dcb03c; --mpi-green: #2f8a3b; --mpi-grey: #a0a5ab;
  --mpi-hover: #e8eff6; --mpi-blank: #f7eeee; --mpi-assumed: #e7f1e8; --mpi-assumed-text: #2f6a37;
}
.mpi {
  color-scheme: light;
  background: var(--mpi-bg); color: var(--mpi-text); border: 1px solid var(--mpi-line); border-radius: 4px;
  padding: .9rem .75rem 1.1rem; font: 14px/1.45 Lato, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.mpi-section + .mpi-section { margin-top: 1.1rem; }
.mpi-section-title { margin: 0 0 .4rem .1rem; font-size: 15px; font-weight: 400; letter-spacing: .1em; color: var(--mpi-muted); }
.mpi-table { border: 1px solid var(--mpi-frame); }
.mpi-row {
  display: grid; grid-template-columns: minmax(12rem, 38%) 5.5rem minmax(0, 1fr); align-items: start;
  border-top: 1px solid var(--mpi-line); padding: .55rem .6rem .6rem 0;
}
.mpi-row:first-child { border-top: 0; }
.mpi-row.remaining { background: var(--mpi-blank); }
.mpi-row:not(.mpi-head):hover { background: var(--mpi-hover); }
.mpi-head { grid-template-columns: minmax(12rem, 38%) 5.5rem minmax(0, 1fr) auto; align-items: center; color: var(--mpi-muted); font-size: 15px; }
.mpi-concern, .mpi-head > :first-child { padding-left: 3rem; }
.mpi-title { font-size: 15px; }
.mpi-detail { margin-top: .4rem; font-size: 13px; color: var(--mpi-muted); overflow-wrap: anywhere; }
.mpi-media { color: var(--mpi-muted); padding-top: .1rem; }
.mpi-media a { color: inherit; }
.mpi-fields { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.mpi-fields.inline { flex-direction: row; flex-wrap: wrap; column-gap: .5rem; }
.mpi-label { font-size: 11px; letter-spacing: .05em; margin-bottom: .2rem; color: var(--mpi-muted); }
.mpi-buttons { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.mpi-empty { color: var(--mpi-muted); display: block; padding-left: 3rem; }

.mpi-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 5.6rem; height: 2.25rem; padding: 0 .7rem; border-radius: 3px; cursor: pointer;
  background: transparent; color: var(--mpi-text); border: 1px solid var(--mpi-grey); font: inherit; font-size: 15px;
}
.mpi-btn.tone-red { border-color: var(--mpi-red); }
.mpi-btn.tone-yellow { border-color: var(--mpi-yellow); }
.mpi-btn.tone-green { border-color: var(--mpi-green); }
.mpi-btn.tone-grey { border-color: var(--mpi-grey); }
.mpi-btn.is-on.tone-red { background: var(--mpi-red); color: #fff; font-weight: 700; }
.mpi-btn.is-on.tone-yellow { background: var(--mpi-yellow); color: var(--mpi-text); font-weight: 700; }
.mpi-btn.is-on.tone-green { background: var(--mpi-green); color: #fff; font-weight: 700; }
.mpi-btn.is-on.tone-grey { background: var(--mpi-grey); color: var(--mpi-text); }
/* Not clearly answered in the recording: a pass that still needs a person to confirm it. */
.mpi-btn.is-on.assumed { background: var(--mpi-assumed); color: var(--mpi-assumed-text); border-style: dashed; }
.mpi-btn:focus-visible { outline: 2px solid #4c8dff; outline-offset: 1px; }
/* Read-only pills (results, measurements) share the button look without acting like buttons. */
span.mpi-btn { cursor: default; }

.mpi-psi { width: 4rem; border: 0; border-bottom: 1px solid var(--mpi-muted); text-align: center; font: inherit; background: transparent; color: inherit; }
.mpi-unit { font-size: 11px; margin-right: .5rem; color: var(--mpi-muted); }
.mpi-pass-remaining {
  border: 0; border-radius: 4px; padding: .55rem .8rem; font: 400 14px/1 Lato, "Segoe UI", Arial, sans-serif; text-transform: uppercase;
  letter-spacing: .02em; background: var(--mpi-green); color: #fff; cursor: pointer;
}
.mpi-pass-remaining:disabled { background: var(--mpi-line); color: var(--mpi-grey); cursor: default; font-weight: 400; }
.mpi-save { margin: .5rem 0 0; font-size: 13px; color: var(--mpi-muted); min-height: 1em; }

@media (max-width: 760px) {
  .mpi-row, .mpi-head { grid-template-columns: 1fr; row-gap: .35rem; padding-left: .5rem; }
  .mpi-concern, .mpi-head > :first-child, .mpi-empty { padding-left: 0; }
  .mpi-head > :nth-child(2), .mpi-head > :nth-child(3) { display: none; }
  .mpi-media:empty { display: none; }
}
