/* VastPeek's pages: what they add to /site.css, which holds the shared look and VastPeek's accent (.t-vastpeek). */

/* chart dots: one hue in two steps, dark and light, so they stay apart for colour-blind readers; both pass 3:1 on white */
.t-vastpeek { --first: #0c4a6e; --again: #0b8fcf; }

.tests-label { text-align: center; }
.key { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: var(--again); }
.key.f { background: var(--first); }

/* ---------- charts ----------
   Each chart is a table, one row per file, drawn as a dot plot or as bars. Dots, bars and gridlines
   sit at percentages of the track; the time charts are log scales, ten times per gridline. */
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.alt .charts { margin-top: clamp(40px, 5vw, 64px); }
.chart { padding: 24px 24px 10px; border-radius: var(--radius); background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.alt .chart { box-shadow: var(--shadow); }
.chart figcaption { font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.012em; color: var(--ink); }
.chart figcaption span { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.plot { --g: linear-gradient(var(--line), var(--line)); display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content max-content; column-gap: 14px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.plot > div { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
.plot > [role="row"]:not(.head) { min-height: 28px; }
.plot > [role="row"]:not(.head):hover { background: var(--mist); }
.plot [role="rowheader"] { white-space: nowrap; color: var(--text); }
.plot [role="cell"] { font-size: 12.5px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.head { padding-bottom: 4px; font-size: 12px; font-weight: 500; text-align: right; }
.head > :nth-child(2) { grid-column: 3; }
.head > :nth-child(3) { grid-column: 4; }
.track { position: relative; align-self: stretch; background: no-repeat 0 0 / 1px 100%; }
.d2 .track { background-image: var(--g), var(--g), var(--g); background-position: 0, 50%, 100%; }
.d3 .track { background-image: var(--g), var(--g), var(--g), var(--g); background-position: 0, 33.33%, 66.67%, 100%; }
.d4 .track { background-image: var(--g), var(--g), var(--g), var(--g), var(--g); background-position: 0, 25%, 50%, 75%, 100%; }
.d5 .track { background-image: var(--g), var(--g), var(--g), var(--g), var(--g), var(--g); background-position: 0, 20%, 40%, 60%, 80%, 100%; }
.dots .track::before { content: ""; position: absolute; top: calc(50% - 1px); left: min(var(--f), var(--a)); right: calc(100% - max(var(--f), var(--a))); height: 2px; border-radius: 1px; background: var(--line-2); }
.dots .track i { position: absolute; top: 50%; left: var(--a); width: 11px; height: 11px; border-radius: 50%; background: var(--again); box-shadow: 0 0 0 2px var(--paper); transform: translate(-50%, -50%); }
.dots .track .f { left: var(--f); background: var(--first); }
/* where the two times nearly match, the Again dot sits inside the First one */
.dots .near .f { width: 17px; height: 17px; }
.dots .near .a { width: 7px; height: 7px; box-shadow: 0 0 0 1.5px var(--paper); }
.dots .track i::after { content: ""; position: absolute; inset: -7px; } /* a bigger target for the tooltip */
.bars { grid-template-columns: max-content minmax(0, 1fr); }
.bars .track { display: flex; align-items: center; gap: 8px; text-align: left; }
.bars.d3 .track { background-image: linear-gradient(var(--line-2), var(--line-2)), var(--g), var(--g), var(--g); }
.bars .track i { flex: none; height: 14px; border-radius: 0 7px 7px 0; background: linear-gradient(90deg, var(--first), var(--again)); }
.axis { grid-column: 2; position: relative; height: 26px; font-size: 11px; color: var(--muted); }
.axis span { position: absolute; top: 8px; line-height: 1; white-space: nowrap; transform: translateX(-50%); }
.bars .axis span:last-child { transform: translateX(-100%); } /* nothing to its right, so keep it inside the card */

@media (max-width: 1100px) { /* below this, two charts a row crowd the tick labels */
  .charts { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 600px) {
  .chart { padding: 20px 16px 8px; border-radius: 20px; }
  /* each row turns into two lines: the file and its times, then the track at full width */
  .plot { grid-template-columns: minmax(0, 1fr) max-content max-content; }
  .bars { grid-template-columns: minmax(0, 1fr); }
  .plot > [role="row"]:not(.head) { padding-top: 6px; }
  .head > :nth-child(2), .head > :nth-child(3) { grid-column: auto; }
  .track { grid-row: 2; grid-column: 1 / -1; height: 18px; }
  .axis { grid-column: 1 / -1; }
  .axis span:first-child { transform: none; }
  .axis span:last-child { transform: translateX(-100%); }
}
@media (forced-colors: active) {
  .key, .track i { forced-color-adjust: none; }
}
