/* Personal benchmark page — additions on top of style.css */

.who {
  display: flex; align-items: end; gap: 14px; flex-wrap: wrap;
  margin: 26px 0 4px; padding: 14px 16px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
}
.who label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-secondary); }
.who select {
  font: inherit; font-size: 14px; padding: 7px 10px; min-width: 260px;
  background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border-strong); border-radius: 7px;
}
.who .dim { padding-bottom: 8px; font-size: 12.5px; }

/* highlight tiles carry the accent only on the value, never the label text */
/* No colour on tile values. Blue was applied to some numbers and not others with
   no rule behind it, which reads as meaning something it does not. */

.sliders {
  display: grid; gap: 12px 22px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  margin-bottom: 18px;
}
.sliders label {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px;
  font-size: 13px; color: var(--text-secondary);
}
.sliders input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--series-1); }
.sliders output {
  font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-primary); font-size: 13px;
}

.pipeline-result {
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
}
.pipeline-result .cell .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.pipeline-result .cell .k { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.pipeline-result .cell.accent .v { color: var(--series-1); }

/* percentile bars */
.pct-row { display: grid; grid-template-columns: 190px 1fr 62px; align-items: center; gap: 12px; margin-bottom: 12px; }
.pct-row .lab { font-size: 13px; color: var(--text-secondary); }
.pct-track {
  position: relative; height: 20px; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.pct-fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--series-1); }
.pct-median { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text-muted); }
.pct-val { font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.pct-legend { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

@media (max-width: 620px) {
  .pct-row { grid-template-columns: 1fr; gap: 4px; }
  .pct-val { text-align: left; }
}

.pick-prompt {
  margin: 30px 0; padding: 34px 24px; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-1); color: var(--text-secondary);
}
.pick-prompt p { margin: 0; max-width: 52ch; margin-inline: auto; }

.hist-card {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.hist-card h3 { margin: 0 0 2px; font-size: 14px; font-weight: 620; }
.hist-card .sub { margin: 0 0 10px; font-size: 12px; color: var(--text-muted); }

.theme-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.theme-tags button {
  font: inherit; font-size: 13px; padding: 6px 13px; border-radius: 999px; cursor: pointer;
  background: var(--surface-2); color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.theme-tags button:hover { border-color: var(--series-1); color: var(--series-1); }
.theme-tags button[aria-pressed="true"] { background: var(--series-1); color: #fff; border-color: var(--series-1); }

.sub-head { font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
            color: var(--text-muted); margin: 22px 0 10px; }
.collab-row {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 11px 14px; margin-bottom: 8px;
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius);
}
.collab-row .who { font-weight: 600; font-size: 14px; }
.collab-row .cnt {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--series-1); color: #fff; font-weight: 600;
}
.collab-row .det { font-size: 12.5px; color: var(--text-secondary); }
.peer-list { font-size: 13px; color: var(--text-secondary); line-height: 1.9; }
.peer-list b { color: var(--text-primary); font-weight: 600; }

.hist-card svg, .chart-card .chart svg { display: block; }
/* the peer list is the tall element in its row; cap it so the row stays balanced */
#peer-table { max-height: 340px; overflow-y: auto; }

dialog#expected-dialog {
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 26px;
  background: var(--surface-1); color: var(--text-primary);
  max-width: 560px; width: calc(100% - 40px); box-shadow: var(--shadow);
}
dialog#expected-dialog::backdrop { background: rgba(0,0,0,.5); }
dialog#expected-dialog .close {
  position: absolute; top: 14px; right: 16px; border: 0; background: none;
  color: var(--text-muted); font-size: 16px; cursor: pointer;
}
dialog#expected-dialog h3 { margin: 0 0 10px; font-size: 17px; }
.dlg-lead { margin: 0 0 18px; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.dlg-foot { margin: 14px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--text-muted); }
