/* Valuation analytics extension (valuation.js): premiums card and regression card.
   Theme tokens only (web/pro/styles.css), so light and dark mode both work. */

.val-filters { margin-bottom: 10px; }
.val-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }
.val-chiplabel { width: 96px; font-size: 12px; color: var(--text-2); }
.val-chip { font: inherit; font-size: 12px; padding: 3px 10px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; }
.val-chip:hover { border-color: var(--muted); color: var(--text); }
.val-chip.on { border-color: var(--series-1); background: var(--series-1-soft); color: var(--text); font-weight: 600; }
.val-chip:disabled { opacity: .55; cursor: not-allowed; }
.val-halflife { width: auto; font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); color: var(--text); }
.val-hint { margin: 4px 0 0; }

.val-def { margin: 4px 0 10px; line-height: 1.45; }
.val-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; background: var(--info-bg); color: var(--info-ink);
  font-size: 12.5px; line-height: 1.45; }
.val-h { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.val-h .muted { font-weight: 400; }

.val-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.val-stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; background: var(--surface-2); }
.val-stat .k { font-size: 11.5px; color: var(--text-2); }
.val-stat .v { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.val-stat .s { font-size: 11px; color: var(--muted); }

.val-warn { margin: 6px 0 8px; padding: 6px 10px 6px 26px; border-radius: 6px; background: var(--warning-bg);
  color: var(--warning-ink); font-size: 12px; line-height: 1.45; }
.val-warn li + li { margin-top: 2px; }

.val-table { font-variant-numeric: tabular-nums; }
.val-table th { font-weight: 600; color: var(--text-2); white-space: nowrap; }
.val-table td { white-space: nowrap; }
.val-table th.l, .val-table td.l { text-align: left; }
.val-table tr.val-all td { font-weight: 600; }
.val-table tr.val-sub td { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  padding-top: 8px; border-bottom: 0; }
.val-src { font-size: 10.5px; }
.val-resid { max-height: 260px; overflow-y: auto; }

.val-svg { display: block; width: 100%; height: auto; }
.val-svg text { fill: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.val-svg .val-axis { fill: var(--muted); font-size: 11px; }
.val-svg .val-rowhead { fill: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.val-svg .val-label.paid { fill: var(--text); font-weight: 600; }
.val-svg .val-n { fill: var(--text-2); font-size: 11.5px; }
.val-svg .val-grid { stroke: var(--grid); }
.val-svg g[tabindex]:focus { outline: none; }
.val-svg g[tabindex]:focus .val-box, .val-svg g[tabindex]:focus .val-bar { stroke: var(--text); stroke-width: 1.5; }
.val-whisk { stroke: var(--muted); stroke-width: 1.25; }
.val-box { fill: var(--series-1-soft); stroke: var(--series-1); stroke-width: 1; }
.val-box.all { fill: var(--series-1); }
.val-med { stroke: var(--text); stroke-width: 2; }
.val-box.all + .val-med { stroke: var(--surface); }
.val-bar { fill: var(--series-1); opacity: .55; }
.val-bar.paid { fill: var(--target); opacity: 1; }
.val-barmed { stroke: var(--surface); stroke-width: 2; }

.val-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 6px; }
.val-actions .val-h { margin: 0; flex: 1 1 auto; }
.val-cp { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 4px; }

.val-specs { display: grid; gap: 6px; }
.val-spec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.val-spec-m { width: 110px; font-weight: 600; }
.val-spec select { flex: 1 1 112px; max-width: 190px; }
.val-spec select, .val-xpick { width: auto; min-width: 0; font: inherit; font-size: 12px;
  padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.val-tabs { display: inline-flex; margin: 8px 0 6px; }
.val-fitline { margin: 6px 0 8px; font-size: 13px; }
.val-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 4px 16px;
  align-items: start; }
.val-xsel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.val-pt { fill: var(--series-1); opacity: .5; }
.val-pt:hover { opacity: 1; }
.val-trend { stroke: var(--text-2); stroke-width: 1.75; stroke-dasharray: 5 3; }
.val-int { stroke: var(--target); stroke-width: 2; opacity: .6; }
.val-fitted { fill: var(--surface); stroke: var(--target); stroke-width: 2; }
.val-tgt { fill: var(--target); stroke: var(--surface); stroke-width: 1.5; }
.val-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.val-key { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; border-radius: 50%; }
.val-key.pt { background: var(--series-1); opacity: .6; }
.val-key.fit { height: 0; width: 14px; border-radius: 0; border-top: 2px dashed var(--text-2); vertical-align: 3px; }
.val-key.tgt { background: var(--target); }
.val-key.fitted { border-radius: 2px; border: 2px solid var(--target); transform: rotate(45deg); width: 8px; height: 8px; }
.val-detail { margin: 8px 0 0; }

@media (max-width: 600px) {
  .val-chiplabel { width: 100%; }
  .val-spec-m { width: 100%; }
  /* Drivers stack one per line on phones: three selects side by side would truncate their labels. */
  .val-spec select { flex-basis: 100%; max-width: none; }
  .val-spec .val-plus { display: none; }
}
