/* MIDI CC chart */
[hidden] { display: none !important; }
.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; }

#cc-tool h2 { margin-top: .25rem; }
.cc-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: .75rem 1rem; align-items: end; }
.cc-fields > div { min-width: 0; }
.cc-fields label { font-weight: 600; margin-bottom: .25rem; }
.cc-fields input, .cc-fields select { width: 100%; margin: 0; }
.cc-hint { font-size: .9rem; margin: .4rem 0 .75rem; }
.cc-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .25rem 0 .5rem; }
.cc-chip { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; margin: 0; }
.cc-chip[aria-pressed="true"] { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.cc-status { margin: .35rem 0; min-height: 1.6em; color: var(--ink); }

.table-scroll { position: relative; overflow-x: auto; max-width: 100%; margin: 1rem 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; width: 100%; border-collapse: collapse; }
.table-scroll caption { text-align: start; padding: .6rem .75rem 0; }
.cc-table th, .cc-table td, .rpn-table th, .rpn-table td { vertical-align: top; }
.cc-table td:nth-child(3) { min-width: 13rem; }
.cc-table td:nth-child(4) { min-width: 10rem; }
.cc-table td:nth-child(5) { min-width: 16rem; }
.cc-table tbody th { text-align: end; font-variant-numeric: tabular-nums; }
.cc-pair { color: var(--muted); font-size: .9em; }
.cc-table tr { scroll-margin-top: 1rem; }
.cc-table tr:target > * { background: #47345b; }
.cc-table tr:target > th { box-shadow: inset 4px 0 0 var(--accent); }
.cc-copy { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; white-space: nowrap; margin: 0; padding: .35rem .6rem; }

.byte-list code { white-space: nowrap; }

@media (max-width: 650px) {
  .cc-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cc-fields > div:first-child { grid-column: 1 / -1; }
  .table-scroll th, .table-scroll td { padding: .4rem; }
}
