/* Live locus tracks. Coordinates and scores come from data/abi5-locus.json. */
.locus-browser { margin: 30px 0; border: 1px solid var(--rule-2); border-radius: 10px; background: var(--card); overflow: hidden; font-family: var(--sans); }
.locus-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--rule); background: var(--sage); }
.locus-browser h2 { margin: 0 0 5px; font-size: 19px; }
.locus-heading p { margin: 0; color: var(--ink-2); font-size: 12px; }
.locus-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.locus-tools button { font: 600 12px var(--sans); color: var(--ink-2); background: var(--card); border: 1px solid var(--rule-2); border-radius: 5px; padding: 7px 10px; cursor: pointer; min-height: 34px; }
.locus-tools button:first-child, .locus-tools button:nth-child(2) { font-size: 17px; min-width: 34px; padding: 3px 9px; }
.locus-tools button:hover { background: var(--lime-2); color: var(--ink); }
.locus-tools button:disabled { opacity: .4; cursor: default; }
.locus-browser .locus-region { margin: 0; padding: 12px 22px 0; font: 11px var(--mono); color: var(--ink-2); max-width: none; }
.locus-scroll { overflow-x: auto; padding: 0 12px; }
#locus-plot { min-width: 0; }
#locus-plot svg { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: crosshair; }
#locus-plot text { fill: var(--ink-2); font: 10.5px var(--mono); }
#locus-plot .track-name { fill: var(--ink); font: 600 11px var(--sans); }
#locus-plot .gene-label { font: italic 10px var(--sans); }
#locus-plot .gene-label.causal-gene { font-weight: 800; fill: var(--ink); }
#locus-plot .grid { stroke: var(--rule); stroke-width: .7; }
#locus-plot .gene-line { stroke: var(--tree-2); stroke-width: 1; fill: none; }
#locus-plot .exon { fill: var(--tree-2); }
#locus-plot .gene.causal-gene .exon { fill: var(--accent); }
#locus-plot .gene.causal-gene .gene-line { stroke: var(--accent); }
#locus-plot .score-stems { fill: none; stroke: var(--tree-2); stroke-width: 1; opacity: .85; }
#locus-plot .snp-rug { fill: none; stroke: var(--tree-2); stroke-width: 1; opacity: .6; }
#locus-plot .causal-stem { stroke: var(--ink); stroke-width: 2; }
#locus-plot .causal-dot { fill: var(--lime); stroke: var(--ink); stroke-width: 1.3; }
#locus-plot .context-window { fill: color-mix(in srgb, var(--ours-light) 13%, var(--card)); }
#locus-plot .focus-line { stroke: var(--ink-3); stroke-dasharray: 3 3; stroke-width: 1; }
#locus-plot .focus-dot { fill: var(--card); stroke: var(--ink); stroke-width: 1.8; }
#locus-plot .threshold { fill: none; stroke: var(--ink-3); stroke-dasharray: 4 4; stroke-width: 1; }
.locus-readout { display: flex; align-items: center; gap: 7px 20px; flex-wrap: wrap; min-height: 64px; padding: 13px 22px; border-top: 1px solid var(--rule); background: var(--paper-2); font: 12px var(--mono); color: var(--ink-2); }
.locus-readout strong { color: var(--ink); font-weight: 500; }
.locus-readout .causal-tag { display: inline-flex; align-items: center; gap: 7px; font: 600 12px var(--sans); color: var(--ink); }
.locus-readout .causal-tag::before { content: ''; width: 8px; height: 8px; transform: rotate(45deg); background: var(--lime); border: 1px solid var(--ink); }
.locus-readout .variant-tag { font: 12px var(--sans); }
.locus-browser figcaption { margin: 0; padding: 11px 22px; max-width: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 24px; font-size: 11px; border-top: 1px solid var(--rule); }
.locus-browser figcaption a { color: var(--ink-2); }
.locus-browser .locus-fallback { margin: 15px 22px; font-size: 14px; }
@media (max-width: 640px) {
  .locus-heading { padding: 16px; gap: 12px; }
  .locus-browser .locus-region { padding: 12px 16px 0; font-size: 10px; }
  .locus-readout, .locus-browser figcaption { padding-left: 16px; padding-right: 16px; }
  .locus-tools button { min-height: 40px; }
}
