/* MIDI ↔ MusicXML converters and the MIDI format converter. */
.cv { display: grid; gap: 1rem; margin: 1.5rem 0; }
.cv h2, .cv h3 { margin: 0; }
.cv label { display: block; }
.cv input[type="file"] { width: 100%; max-width: 100%; }
.cv-drop { border: 2px dashed var(--line); border-radius: .75rem; padding: 1rem; }
.cv-drop.cv-over { border-color: var(--accent); background: #2c2a45; }
.cv-drop p { margin: .4rem 0; }
.cv-row { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: end; }
.cv-row select { min-width: 12rem; }
.cv-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.cv-buttons button { margin: 0; }
.cv-check { display: flex; align-items: center; gap: .65rem; min-height: 44px; cursor: pointer; }
.cv-check input { flex: none; width: 1.35rem; height: 1.35rem; min-height: 0; padding: 0; margin: 0; accent-color: var(--accent); }
.cv-report { border-top: 1px solid var(--line); padding-top: .5rem; display: grid; gap: .75rem; }
.cv-report dl { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: .35rem 1rem; margin: 0; }
.cv-report dt { font-weight: 700; }
.cv-report dd { margin: 0; overflow-wrap: anywhere; }
.cv-error { color: #ff9a9a; }
.cv-error:empty, .cv-warnings:empty { display: none; }
.cv-warnings { margin: 0; color: #ffd28a; padding-left: 1.2rem; }
.cv-preview { max-height: 22rem; overflow: auto; font-size: .82rem; white-space: pre; }
.cv-table { width: 100%; border-collapse: collapse; }
.cv-table th, .cv-table td { text-align: start; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
.cv-samples a { white-space: nowrap; }
@media (max-width: 650px) {
  .cv-report dl { grid-template-columns: minmax(0, 1fr); }
  .cv-report dd { margin-bottom: .4rem; }
}
.cv-row > div { min-width: 0; max-width: 100%; }
.cv select { max-width: 100%; }
@media (max-width: 650px) { .cv-row > div, .cv-row select { width: 100%; } .cv-row select { min-width: 0; } }
.cv > * { min-width: 0; }
.cv-buttons button { white-space: normal; text-align: start; }
.table-scroll { position: relative; overflow-x: auto; max-width: 100%; margin: .75rem 0; border: 1px solid var(--line); border-radius: .6rem; }
.table-scroll:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.table-scroll table { margin: 0; }
.table-scroll caption { text-align: start; padding: .5rem .6rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cv-table tr.mxc-error td:first-child { color: #ff9a9a; font-weight: 700; }
.cv-table tr.mxc-warning td:first-child { color: #ffd28a; font-weight: 700; }
.cv-table tr.mxc-info td:first-child { color: #9ee6a8; font-weight: 700; }
.cv-table td { vertical-align: top; }
#mxc-rows td:last-child { min-width: 16rem; }
.cv [hidden] { display: none !important; }
/* Measure checker: on narrow screens each finding becomes a labelled card instead of an 8-column row. */
@media (max-width: 650px) {
  #mxc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #mxc-table table, #mxc-table tbody, #mxc-table tr { display: block; }
  #mxc-table tr { border-bottom: 1px solid var(--line); padding: .4rem 0; }
  #mxc-table td { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .5rem; border: 0; padding: .15rem .6rem; }
  #mxc-table td::before { content: attr(data-label); font-weight: 700; color: var(--ink); }
  #mxc-rows td:last-child { min-width: 0; }
  #mxc-table caption { display: block; }
}
