.jac { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.jac > *, .jac-grid, .jac-panel > * { min-width: 0; }
.jac-mode { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.jac-mode legend { grid-column: 1 / -1; }
.jac-opt { display: flex !important; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: #fff; font: 400 1rem var(--f-body) !important; color: var(--ink) !important; letter-spacing: 0 !important; cursor: pointer; }
.jac-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.jac-opt input { width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.jac-opt:has(input:focus-visible) { outline: 3px solid var(--teal); outline-offset: 2px; }
.jac-panel { display: grid; gap: 12px; min-width: 0; }
.jac-panel[hidden], .jac-row[hidden] { display: none; }
.jac-panel > p { margin: 0; }
.jac textarea { font-family: var(--f-mono) !important; font-size: 0.95rem !important; line-height: 1.5; resize: vertical; }
.jac-row, .jac-names { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.jac-names { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin-bottom: 12px; }
.jac-scroll { overflow-x: auto; max-width: 100%; }
.jac-matrix { border-collapse: collapse; }
.jac-matrix caption { text-align: left; padding-bottom: 8px; color: var(--ink-soft); }
.jac-matrix th { font: 600 0.875rem var(--f-mono); color: var(--ink); padding: 6px 8px; text-align: left; white-space: nowrap; }
.jac-matrix thead th:first-child { font-weight: 400; color: var(--ink-soft); }
.jac-matrix td { padding: 4px; }
.jac-matrix input[type=number] { width: 5.5rem; text-align: right; font-family: var(--f-mono); }
.jac-presets { margin-top: 0; }
.jac-two { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.jac-two p { margin: 8px 0 0; }
.jac-two svg { max-width: 420px; }
.jac-h { font: 600 1.05rem var(--f-display); margin: 0 0 8px; }
.jac-todo { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.jac-more, .jac-bands { border-top: 1px solid var(--rule); padding-top: 8px; }
.jac-more summary, .jac-bands summary { font: 600 1.05rem var(--f-display); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.jac-more summary:focus-visible, .jac-bands summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.jac-more form { margin-top: 8px; }
.jac-more .tool-actions { margin-top: 12px; }
.jac-bands table { max-width: 360px; margin-top: 8px; }
.jac-bands tr.is-here td { background: var(--ochre); color: var(--ink); font-weight: 600; }
.jac sub { font-size: 0.75em; }
.jac-copy { margin-top: 8px; }
.jac-row[data-passrow] { max-width: 520px; }
.jac-scale { margin: 4px 0; min-width: 0; }
.jac-scale__top, .jac-scale__ticks { position: relative; height: 1.6em; }
.jac-scale__top span, .jac-scale__ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.jac-scale__top { font: 600 1rem/1.6 var(--f-mono); color: var(--ink); }
.jac-scale__ticks { font: 400 0.8125rem/1.6 var(--f-mono); color: var(--ink-soft); }
.jac-scale__ticks span.is-end { transform: translateX(-100%); }
.jac-scale__bar { position: relative; }
.jac .jac-scale__bar svg { display: block; width: 100%; height: 52px; overflow: visible; }
.jac-scale__dot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--ink); }
.jac-scale__bands { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); text-align: center; font: 400 0.875rem/1.25 var(--f-body); color: var(--ink-soft); }
.jac-scale__bands > span { padding: 0 2px; overflow-wrap: anywhere; hyphens: auto; }
.jac-scale__bands > .is-here { color: var(--ink); font-weight: 600; }
.jac-scale .jac-short { display: none; }
.jac-scale__key { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.jac-key { display: inline-flex; align-items: center; gap: 6px; }
.jac-key > span { flex: none; }
.jac-key-bar { display: inline-block; width: 18px; height: 12px; border: 3px solid var(--teal); }
.jac-key-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
@media (max-width: 560px) {
  .jac-scale .jac-full { display: none; }
  .jac-scale .jac-short { display: inline; }
  .jac-scale__bands, .jac-scale__ticks { font-size: 0.75rem; }
}
@media (max-width: 720px) {
  .jac-two { grid-template-columns: minmax(0, 1fr); }
  .jac-matrix input[type=number] { width: 3.6rem; padding: 8px 6px; }
  .jac-matrix th { padding: 4px; }
  .jac .tool-result th, .jac .tool-result td { padding: 6px 5px; }
}
