/* Advanced tab (desktop AdvancedView): field list, lanes, lower panel. Colours from theme.css tokens. */
.adv { display: flex; flex-direction: column; height: 100%; min-height: 0; padding-bottom: 8px; }
.adv-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.adv-tools .how-to-read { margin-right: 6px; font-size: 14px; }
.adv-chip { font-size: 12.5px; padding: 3px 9px; border: 1px solid var(--sp-border); border-radius: 11px; background: var(--sp-surface-alt); color: var(--sp-text); white-space: nowrap; }
.adv-chip > span { color: var(--sp-text-muted); }
.adv-tools-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.adv-search { width: 200px; }
.adv-seg { display: inline-flex; }
.adv-seg > button { font: inherit; font-size: 13px; padding: 4px 10px; border: 0; background: var(--sp-control-bg, var(--sp-surface-raised)); color: var(--sp-text); cursor: pointer; }
.adv-seg > button:first-child { border-radius: 4px 0 0 4px; }
.adv-seg > button:last-child { border-radius: 0 4px 4px 0; }
.adv-seg > button.on { background: var(--sp-accent); color: var(--sp-ctl-mark, #0E1A12); }
.adv-seg > button:disabled { opacity: .5; cursor: default; }
.adv-reset { margin: 0; }
.adv-message { padding: 16px; font-size: 14px; }
.adv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 10px; }
.adv-list { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--sp-border); border-radius: 4px; }
.adv-list-head { display: flex; justify-content: space-between; padding: 6px 10px; font-size: 11.5px; color: var(--sp-text-muted); }
.adv-list-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 6px; }
.adv-group { display: flex; justify-content: space-between; margin: 6px 10px 2px 8px; font-size: 11.5px; font-weight: 700; color: var(--sp-text-secondary); cursor: pointer; user-select: none; }
.adv-group.static { cursor: default; }
.adv-count { font-weight: 400; color: var(--sp-text-muted); }
.adv-field { display: flex; align-items: center; height: 20px; margin: 0 10px 0 14px; cursor: pointer; font-size: 13px; }
.adv-field:hover { background: var(--sp-surface-alt); }
.adv-swatch { flex: none; width: 13px; height: 13px; border-radius: 2px; border: 1.3px solid var(--sp-neutral); margin-right: 8px; box-sizing: border-box; }
.adv-swatch.on { border: 0; }
.adv-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--sp-text); }
.adv-logged { font-size: 11.5px; color: var(--sp-neutral); margin-left: 3px; }
.adv-badge { font-size: 10.5px; color: var(--sp-accent); border: 1px solid color-mix(in srgb, var(--sp-accent) 55%, transparent); border-radius: 3px; padding: 0 4px; margin-left: 6px; }
.adv-value { flex: none; width: 72px; text-align: right; font-variant-numeric: tabular-nums; color: var(--sp-text); }
.adv-unit { flex: none; width: 36px; margin-left: 6px; font-size: 12px; color: var(--sp-text-muted); }
.adv-more { margin: 2px 0 4px 34px; font-size: 12.5px; color: var(--sp-text-muted); cursor: pointer; }
.adv-right { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(260px, 2fr) minmax(150px, 1fr); gap: 8px; min-height: 0; min-width: 0; }
.adv-lanes { position: relative; min-height: 0; }
.adv-lanes > .spc-chart { position: absolute; inset: 0; }
.adv-lower { display: flex; flex-direction: column; min-height: 0; min-width: 0; border: 1px solid var(--sp-border); border-radius: 4px; }
.adv-lower-bar { display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 8px; min-width: 0; }
.adv-lower-bar > .adv-seg { flex: none; }
.adv-caption { min-width: 0; font-size: 12.5px; color: var(--sp-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-caption.right { margin-left: auto; }
.adv-frames { flex: 1; min-height: 0; overflow: auto; outline: none; }
.adv-frames table { border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adv-frames thead { position: sticky; top: 0; z-index: 1; }
.adv-frames th { background: var(--sp-surface); font-weight: 600; color: var(--sp-text-secondary); text-align: right; padding: 3px 9px 0; }
.adv-frames th.calc { color: var(--sp-accent); }
.adv-frames tr.units th { font-weight: 400; font-size: 11px; color: var(--sp-text-muted); padding: 0 9px 2px; border-bottom: 1px solid var(--sp-grid); }
.adv-frames td { text-align: right; padding: 1px 9px; color: var(--sp-text); cursor: pointer; }
.adv-frames .l { text-align: left; }
.adv-frames tr.cursor td { background: color-mix(in srgb, var(--sp-accent) 22%, transparent); }
.adv-settings { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 8px; }
.adv-settings-grid { display: grid; grid-template-columns: 1fr 1.1fr 1.45fr 1fr; gap: 36px; }
.adv-head { font-size: 11.5px; font-weight: 700; color: var(--sp-text-secondary); margin: 6px 0 4px; }
.adv-setting { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--sp-text); margin: 1px 0; }
.adv-setting .label { color: var(--sp-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adv-setting > span:last-child { white-space: nowrap; }
.adv-pids { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 4px; }
.adv-pids th { font-weight: 400; font-size: 12px; color: var(--sp-text-muted); text-align: right; }
.adv-pids td { text-align: right; color: var(--sp-text); }
.adv-pids td.l { text-align: left; color: var(--sp-text-secondary); }
.adv-settings .changed { color: var(--sp-amber); font-weight: 600; }
.adv-adjust { display: flex; gap: 16px; font-size: 13px; color: var(--sp-text-secondary); margin-top: 10px; }
.adv-adjust .label { flex: none; width: 160px; font-weight: 600; color: var(--sp-text); }
.adv-events { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 12px 8px; font-size: 13px; }
.adv-event { display: flex; cursor: pointer; margin: 1px 0; color: var(--sp-text-secondary); }
.adv-event .t { width: 96px; flex: none; color: var(--sp-text-muted); font-variant-numeric: tabular-nums; }
.adv-event .n { width: 200px; flex: none; font-weight: 600; color: var(--sp-text); }
.adv-analyser { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.adv-analyser-bar { display: flex; align-items: center; gap: 8px; padding: 0 8px 4px; }
.adv-analyser-bar .adv-seg { margin-left: 8px; }
.adv-analyser-plot { flex: 1; min-height: 0; position: relative; }
.adv-analyser-plot > .spc-chart { position: absolute; inset: 0; }
.adv-note { padding: 12px; }
.adv .muted { color: var(--sp-text-muted); }
.adv-pids th, .adv-pids td { padding-left: 8px; }
.adv-rates td.l { padding-left: 0; }
