/* A race on hover over its calendar line (racing-peek.js): fixed beside the line, over the page */

.rpk {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  width: 540px;
  max-width: calc(100vw - 16px);
  padding: 11px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.rpk.rpk-slim { width: 380px; }
.rpk[hidden] { display: none; }
.rpk a { color: inherit; text-decoration: none; }
.rpk a:hover { text-decoration: underline; text-underline-offset: 2px; }

.rpk-name { margin: 0; font: 600 20px/1.15 var(--display); letter-spacing: .01em; }
.rpk-meta { margin: 2px 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.rpk-meta span + span::before { content: "·"; margin: 0 6px; color: var(--faint); }

/* The circuit beside the results, as tall as they are */
.rpk-body { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; align-items: center; }
.rpk-body.rpk-nomap { grid-template-columns: minmax(0, 1fr); }
.rpk-map { display: block; width: 168px; height: 168px; overflow: visible; }
.rpk-map path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.25px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.rpk-t { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; }
.rpk-t td { padding: 2px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: baseline; }
.rpk-t tr + tr td { border-top: 1px solid var(--line); }
.rpk-t td:first-child { padding-left: 0; }
.rpk-t td:last-child { padding-right: 0; }
.rpk-pos { width: 26px; color: var(--muted); font-weight: 600; text-align: right; }
td.rpk-pos { padding-right: 8px; }
.rpk-drv { font-weight: 600; }
.rpk-tm { width: 29%; color: var(--muted); }
.rpk-gap { width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.rpk-espn .rpk-tm { width: 36%; }
.rpk-skip td { padding: 0 0 2px; color: var(--faint); line-height: 1; text-align: left; }
.rpk-t .rpk-skip td { padding-left: 34px; }

/* Pole and fastest lap: small capitals in a hairline box after the name */
.rpk-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 0 3px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  line-height: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.rpk-foot { margin: 8px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.rpk-foot a { color: var(--ink); font-weight: 600; }
.rpk-k { margin-right: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rpk-pod + .rpk-pod { margin-left: 10px; }
.rpk-n { margin-right: 4px; color: var(--faint); font-weight: 600; }
.rpk-sub { margin-left: 6px; }
.rpk-sub a { color: var(--muted); font-weight: 400; }

/* A race not yet run: its sessions' start times */
.rpk-state { margin: 0 0 6px; font: 600 15px/1.2 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.rpk-sched { display: grid; gap: 0; margin: 0; }
.rpk-sched div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.rpk-sched div + div { border-top: 1px solid var(--line); }
.rpk-sched dt { color: var(--muted); }
.rpk-sched dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.rpk-sched dd span { margin-left: 4px; color: var(--muted); font-weight: 400; }

/* A race page: the outline is the masthead icon, black line on the crest's white */
.crest svg.rpk-crest { display: block; width: 58px; height: 58px; overflow: visible; }
.rpk-crest path {
  fill: none;
  stroke: #111;
  stroke-width: 2.25px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
@media (max-width: 600px) {
  .crest svg.rpk-crest { width: 46px; height: 46px; }
}

/* The calendar line whose popover is up */
.racing-cal tr.rpk-on td { background: var(--surface-2); }
