/* Compare mode (site/compare.js).
 * Series colors: slots 1-3 are the validated categorical hues (blue, orange, aqua); slot 4 is a
 * neutral ink that stays distinct from all three in both modes. Validated all-pairs with the
 * dataviz palette validator: light worst CVD ΔE 9.2 / normal 24.0; dark worst CVD ΔE 9.4 / normal 19.5.
 * Every pick also has its own marker shape, and the side-by-side table carries the same numbers. */
:root { --cmp-1: #2a78d6; --cmp-2: #eb6834; --cmp-3: #1baf7a; --cmp-4: #4a463f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --cmp-1: #3987e5; --cmp-2: #d95926; --cmp-3: #199e70; --cmp-4: #b9b4a8; }
}
:root[data-theme="dark"] { --cmp-1: #3987e5; --cmp-2: #d95926; --cmp-3: #199e70; --cmp-4: #b9b4a8; }

.cmp-toolbar .cmp-picker { flex: 1 1 260px; max-width: 420px; }
.cmp-chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.cmp-chip { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow); max-width: 100%; }
.cmp-chip img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.cmp-chip-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.cmp-chip-text a { font-weight: 600; color: var(--ink); text-decoration: none; }
.cmp-chip-text a:hover { text-decoration: underline; }
.cmp-chip-text small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-x { width: 28px; height: 28px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer; }
.cmp-x:hover { background: var(--surface-2); color: var(--ink); }
.cmp-slots { font-size: 13px; }

.cmp-key { display: inline-flex; vertical-align: -2px; margin-right: 6px; }
.cmp-swatch { width: 13px; height: 13px; flex: none; overflow: visible; }
.cmp-th { display: inline-flex; align-items: center; white-space: nowrap; }

/* profile chart */
.cmp-track { stroke: var(--line); stroke-width: 1; }
.cmp-median { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 4 3; }
.cmp-row-label { fill: var(--ink-2); font-size: 12px; }
.cmp-row-label.has-help { cursor: help; }
.cmp-row-label.has-help:hover, .cmp-row-label.has-help:focus { fill: var(--ink); outline: none; }
.cmp-mark { stroke: var(--surface); stroke-width: 2; paint-order: stroke; cursor: default; }
.cmp-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.cmp-ref { stroke-width: 1; stroke-dasharray: 2 4; opacity: .8; }

/* tables */
.cmp-table td { white-space: nowrap; }
.cmp-table td .rk { color: var(--muted); font-size: 11px; margin-left: 2px; }
.cmp-table td.cmp-best span:first-child { font-weight: 700; color: var(--ink); }
.cmp-table td.cmp-best { background: color-mix(in srgb, var(--pos) 9%, transparent); }
.cmp-table tbody th { font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.cmp-matrix td { text-align: center; font-variant-numeric: tabular-nums; }
.cmp-meetings { margin: 0; padding-left: 18px; color: var(--ink-2); }

@media (max-width: 640px) {
  .cmp-toolbar .cmp-picker { max-width: none; flex-basis: 100%; }
  .cmp-chip { flex: 1 1 100%; }
}
@media (forced-colors: active) {
  .cmp-mark, .cmp-swatch path { forced-color-adjust: none; }
}

a.btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
[data-mod^="cmp-"] .table-wrap { overflow-x: auto; position: relative; } /* keeps the screen-reader-only "(best)" labels inside the scroll box */
@container mod (max-width: 560px) {
  [data-mod^="cmp-"] .card-head { flex-wrap: wrap; }
  [data-mod^="cmp-"] .card-head .tools { flex-wrap: wrap; }
}
