/* AnfinsenBench results: filters, the leaderboard's bars, the list of tasks and a task's panel (anfinsenbench.js).
   Used on the Leaderboards page (the home page's stylesheet) and in the post (styles.css), so the colours and the
   type come from whichever page it is on, with the home page's as the fallback. */

.ab {
  --ab-fg: var(--fg, #22251f);
  --ab-fg1: var(--fg1, #3b3f39);
  --ab-fg2: var(--fg2, #4f544d);
  --ab-mute: var(--fg4, #60665e);
  --ab-bg: var(--bg, #fdfdfb);
  --ab-rule: color-mix(in srgb, var(--ab-mute) 18%, transparent);
  --ab-edge: color-mix(in srgb, var(--ab-mute) 30%, transparent);
  --ab-tint: #f3f2ef;
  color: var(--ab-fg1);
  font-family: var(--font-text-variant, inherit);
  font-size: 14px;
  line-height: 1.4;
}

.ab button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}

.ab button:focus-visible,
.ab summary:focus-visible,
.ab input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--ab-fg2) 55%, transparent);
  outline-offset: 2px;
}

.ab [hidden] {
  display: none !important;
}

.ab-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.ab-dot,
.ab-legend i {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.ab-dot {
  margin-right: 0.4em;
}

.ab-num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* ---------- small pictures ---------- */
/* sized here, over a page's own rule for the drawings in its figures */
.ab .ab-icon {
  display: inline-block;
  flex: none;
  width: var(--s);
  height: var(--s);
  vertical-align: -0.2em;
}

.ab-type,
.ab-type > span,
.ab-kind {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  white-space: nowrap;
}

.ab-arrow {
  color: var(--ab-mute);
  font-family: Arial, sans-serif;
  font-size: 0.9em;
}

.ab-kind .ab-icon {
  color: var(--ab-fg2);
}

/* ---------- filters: a label and its chips per line, the chips of every line starting at the same place ---------- */
.ab-filters {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.45rem 0.9rem;
  align-items: start;
}

.ab-filter-label {
  display: flex;
  align-items: center;
  height: 1.9rem;
  color: var(--ab-mute);
  font-size: 12.5px;
  font-weight: 500;
}

.ab-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-width: 0;
}

.ab .ab-chip {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  height: 1.9rem;
  padding: 0 0.55rem;
  border: 1px solid var(--ab-edge);
  border-radius: 6px;
  background: var(--ab-bg);
  color: var(--ab-fg1);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.ab .ab-chip:hover {
  border-color: color-mix(in srgb, var(--ab-mute) 60%, transparent);
}

.ab .ab-chip[aria-pressed="true"] {
  border-color: var(--ab-fg);
  background: var(--ab-tint);
  color: var(--ab-fg);
  box-shadow: inset 0 0 0 0.5px var(--ab-fg);
}

.ab .ab-chip.ab-absent {
  opacity: 0.4;
  cursor: default;
}

.ab .ab-chip.ab-absent:hover {
  border-color: var(--ab-edge);
}

/* a count has the room of "999" whatever it reads, so the chips keep their places as the filters change */
.ab-chip-count {
  min-width: 3ch;
  margin-left: 0.2rem;
  color: var(--ab-mute);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  text-align: right;
}

/* the tasks as cards of one size: the stages a task runs between drawn large, its name, and what it asks */
.ab-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.ab .ab-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 0.9rem 0.9rem;
  border: 1px solid var(--ab-edge);
  border-radius: 8px;
  background: var(--ab-bg);
  color: var(--ab-fg1);
  transition: background-color 120ms ease, border-color 120ms ease;
}

.ab .ab-card:hover {
  border-color: color-mix(in srgb, var(--ab-mute) 60%, transparent);
}

.ab .ab-card[aria-pressed="true"] {
  border-color: var(--ab-fg);
  background: var(--ab-tint);
  box-shadow: inset 0 0 0 0.5px var(--ab-fg);
}

.ab .ab-card.ab-absent {
  opacity: 0.4;
  cursor: default;
}

.ab-card-pic {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

/* drawn at twice the size, the pictures keep the weight of line they have when small */
.ab-card .ab-icon * {
  stroke-width: 1px;
}

.ab-card b {
  color: var(--ab-fg);
  font-size: 14px;
  font-weight: 600;
}

.ab-card-text {
  color: var(--ab-mute);
  font-size: 13px;
  line-height: 1.4;
}

.ab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.ab-seg {
  display: inline-flex;
  flex: none;
  padding: 2px;
  border: 1px solid var(--ab-edge);
  border-radius: 7px;
}

.ab .ab-seg button {
  padding: 0.22rem 0.7rem;
  border-radius: 5px;
  color: var(--ab-mute);
  font-size: 13px;
  font-weight: 500;
}

.ab .ab-seg button[aria-pressed="true"] {
  background: #e6e5e0;
  color: var(--ab-fg);
}

/* ---------- the leaderboard's bars ---------- */
.ab-bars {
  margin-top: 1.5rem;
}

.ab-bars-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  color: var(--ab-mute);
  font-size: 12.5px;
}

.ab-bars-what {
  color: var(--ab-fg);
  font-size: 13px;
  font-weight: 600;
}

.ab-bars-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ab-bars-rows li,
.ab-bars-axis {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 9.5rem;
  gap: 0 1rem;
  align-items: center;
}

.ab-bars-rows li {
  height: 2.5rem;
}

.ab-bars-value {
  color: var(--c);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  filter: brightness(0.86);
}

/* the scale runs from 0 to 1, with a faint line at every quarter */
.ab-bars-track {
  position: relative;
  align-self: stretch;
  background: repeating-linear-gradient(to right, var(--ab-rule) 0 1px, transparent 1px 25%), linear-gradient(to left, var(--ab-rule) 1px, transparent 1px);
}

.ab-bars-fill {
  position: absolute;
  top: 50%;
  left: 0;
  width: max(calc(var(--v) * 100%), 0.9rem);
  height: 0.9rem;
  border-radius: 999px;
  background: var(--c);
  transform: translateY(-50%);
  transition: width 260ms ease;
}

.ab-bars-ci {
  position: absolute;
  top: 50%;
  left: calc(var(--lo) * 100%);
  width: calc((var(--hi) - var(--lo)) * 100%);
  height: 0.6rem;
  border-right: 1.25px solid var(--ab-fg2);
  border-left: 1.25px solid var(--ab-fg2);
  background: linear-gradient(var(--ab-fg2), var(--ab-fg2)) center / 100% 1.25px no-repeat;
  transform: translateY(-50%);
  transition: left 260ms ease, width 260ms ease;
}

.ab-bars-name {
  color: var(--ab-fg);
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.ab-bars-axis {
  margin-top: 0.15rem;
  color: var(--ab-mute);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.ab-bars-axis span {
  grid-column: 2;
  grid-row: 1;
  width: 0;
  white-space: nowrap;
}

.ab-bars-axis span:nth-child(2) { margin-left: 25%; }
.ab-bars-axis span:nth-child(3) { margin-left: 50%; }
.ab-bars-axis span:nth-child(4) { margin-left: 75%; }
.ab-bars-axis span:nth-child(5) { margin-left: 100%; direction: rtl; }

/* ---------- the list of tasks ---------- */
.ab-tools {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0 0.5rem;
}

.ab .ab-search {
  width: 16rem;
  max-width: 100%;
  height: 1.9rem;
  padding: 0 0.65rem;
  border: 1px solid var(--ab-edge);
  border-radius: 6px;
  background: var(--ab-bg);
  color: var(--ab-fg);
  font: inherit;
  font-size: 13px;
}

.ab-count {
  color: var(--ab-mute);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ab-table th,
.ab-table td {
  padding: 0.45rem 0 0.45rem 1rem;
  border-bottom: 1px solid var(--ab-rule);
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

.ab-table th:first-child,
.ab-table td:first-child {
  padding-left: 0;
}

.ab-table thead th {
  position: sticky;
  top: var(--site-header-height, 0);
  z-index: 2;
  padding-top: 0.5rem;
  background: var(--ab-bg);
  color: var(--ab-mute);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: bottom;
}

.ab-table .ab-num {
  text-align: right;
}

/* a reward sits on the line of its task, the last line of the row */
.ab-tasks td.ab-num {
  width: 5.2rem;
  vertical-align: bottom;
}

.ab .ab-sort {
  color: var(--ab-mute);
  font-weight: 500;
}

.ab .ab-sort:hover,
.ab .ab-sort[aria-pressed="true"] {
  color: var(--ab-fg);
}

.ab-tasks th.ab-num .ab-sort[aria-pressed="true"]::after {
  content: " ↓";
}

/* a hairline under a reward, as long as the reward is large */
.ab-bar {
  display: block;
  width: 3.4rem;
  height: 2px;
  margin-top: 3px;
  margin-left: auto;
  background: linear-gradient(to right, var(--c) calc(var(--w) * 100%), var(--ab-rule) 0);
}

.ab-task a {
  color: inherit;
  text-decoration: none;
}

.ab .ab-task-name {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  column-gap: 0.6rem;
  row-gap: 0.1rem;
  width: 100%;
}

.ab-task-name b {
  color: var(--ab-fg);
  font-weight: 600;
}

.ab-task-title {
  overflow: hidden;
  color: var(--ab-fg1);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ab-task-kind {
  display: flex;
  grid-column: 2;
  gap: 0.9rem;
  align-items: center;
  color: var(--ab-mute);
  font-size: 12.5px;
}

.ab-task-kind .ab-type {
  min-width: 10.2rem;
}

.ab .ab-task-kind .ab-icon {
  --s: 15px !important;
}

.ab-task-name:hover .ab-task-title,
.ab-task-name:hover .ab-task-kind {
  color: var(--ab-fg);
}

/* a target's further tasks: only what differs, drawn closer */
.ab-table .ab-same th,
.ab-table .ab-same td {
  padding-top: 0.25rem;
}

.ab-table .ab-same .ab-task-name > b,
.ab-table .ab-same .ab-task-title,
.ab-table .ab-same .ab-task-kind > .ab-kind {
  display: none;
}

.ab-table .ab-more th,
.ab-table .ab-more td {
  padding-bottom: 0.25rem;
  border-bottom-color: transparent;
}

.ab-task {
  scroll-margin-top: calc(var(--site-header-height, 0px) + 2.6rem);
}

.ab .ab-cell {
  display: block;
  width: 100%;
  text-align: right;
}

.ab a.ab-cell:hover {
  color: var(--ab-fg);
  font-weight: 600;
}

.ab-table .ab-empty {
  padding: 2rem 0;
  color: var(--ab-mute);
  text-align: center;
}

.ab-status {
  color: var(--ab-mute);
}

/* ---------- a task's panel ---------- */
.ab-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1.1rem 1.8rem;
  align-items: start;
}

.ab-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--ab-edge);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.ab-view,
.ab-canvas {
  position: absolute;
  inset: 0;
}

.ab-view {
  touch-action: pan-y;
}

.ab .ab-view-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0 14%;
  color: var(--ab-mute);
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

.ab-under {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 1.6rem;
  margin-top: 0.5rem;
}

.ab-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
  color: var(--ab-fg2);
  font-size: 12.5px;
}

.ab-legend span {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.ab .ab-reset {
  margin-left: auto;
  color: var(--ab-mute);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.ab .ab-reset:hover {
  color: var(--ab-fg);
}

.ab .ab-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  align-items: center;
  margin: 0 0 0.35rem;
  color: var(--ab-fg2);
  font-size: 13px;
}

.ab .ab-title {
  margin: 0;
  color: var(--ab-fg);
  font-family: var(--font-text-variant, inherit);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.ab .ab-sub {
  margin: 0.3rem 0 0.9rem;
  color: var(--ab-mute);
  font-size: 13px;
  line-height: 1.45;
}

.ab-models {
  display: grid;
  gap: 2px;
  margin-bottom: 0.9rem;
}

.ab .ab-model {
  display: flex;
  gap: 0.1rem;
  align-items: baseline;
  padding: 0.42rem 0.6rem;
  border-radius: 6px;
  color: var(--ab-fg1);
}

.ab .ab-model:hover {
  background: color-mix(in srgb, var(--ab-tint) 60%, transparent);
}

.ab .ab-model[aria-selected="true"] {
  background: var(--ab-tint);
  color: var(--ab-fg);
}

.ab-model[aria-selected="true"] .ab-model-name {
  font-weight: 600;
}

.ab-model-score {
  margin-left: auto;
  padding-left: 0.8rem;
  color: var(--ab-mute);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ab-scores {
  margin: 0;
  border-top: 1px solid var(--ab-rule);
}

.ab-scores div {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--ab-rule);
}

.ab-scores dt {
  color: var(--ab-mute);
  font-size: 13px;
}

.ab-scores dd {
  margin: 0;
  color: var(--ab-fg);
  font-variant-numeric: tabular-nums;
}

.ab-scores div:first-child dd {
  font-weight: 600;
}

.ab-curve {
  margin: 0.9rem 0 0;
}

.ab-spark {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  overflow: visible;
}

.ab-spark-axis {
  stroke: var(--ab-rule);
  stroke-width: 1;
}

.ab-spark-label {
  fill: var(--ab-fg2);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.ab .ab-curve figcaption {
  margin-top: 0.25rem;
  color: var(--ab-mute);
  font-size: 12px;
  line-height: 1.4;
}

/* the agent's account of its method, under the picture and the scores */
.ab-notes {
  grid-column: 1 / -1;
}

.ab-notes:not(:empty) {
  margin-top: 0.3rem;
  padding: 1.1rem 1.35rem 0.6rem;
  border: 1px solid var(--ab-edge);
  border-radius: 8px;
  background: #fff;
}

.ab .ab-account-head {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--ab-fg);
  font-family: var(--font-text-variant, inherit);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.ab .ab-account-sub {
  margin: 0.15rem 0 0.8rem;
  color: var(--ab-mute);
  font-size: 13px;
  line-height: 1.4;
}

.ab-notes .ab-notes-text {
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
}

/* most accounts are one long paragraph, so it runs on from the first column into the second */
@media (min-width: 900px) {
  .ab-notes .ab-notes-text {
    columns: 2;
    column-gap: 2.4rem;
  }
}

.ab-notes-text {
  max-width: 68ch;
  margin-top: 0.6rem;
  padding: 0.85rem 1.1rem 0.2rem;
  border-radius: 6px;
  background: var(--ab-tint);
}

.ab .ab-notes-text p {
  margin: 0 0 0.7rem;
  color: var(--ab-fg1);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .ab-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ab-filters {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }

  .ab-filter-label {
    height: auto;
    margin-top: 0.4rem;
  }

  .ab-chip-count {
    min-width: 0;
  }

  .ab-bars-rows li,
  .ab-bars-axis {
    grid-template-columns: 2.6rem minmax(0, 1fr) 7.4rem;
    gap: 0 0.6rem;
  }

  .ab-bars-name {
    font-size: 13px;
  }

  .ab-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .ab-tools {
    flex-wrap: wrap;
  }

  .ab-tasks td.ab-num {
    width: 3.4rem;
  }

  .ab-table th,
  .ab-table td {
    padding-left: 0.6rem;
  }

  .ab-tasks .ab-bar {
    width: 2.4rem;
  }

  .ab .ab-task-name {
    grid-template-columns: minmax(0, 1fr);
  }

  .ab-task-kind {
    grid-column: 1;
  }
}

/* ---------- the page of one attempt ---------- */
.ab-trial {
  padding: 14px 0 44px;
}

.ab-trial-head {
  margin-bottom: 1.1rem;
}

.ab-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--ab-mute);
  font-size: 13px;
}

.ab-back:hover,
.ab-more-link:hover {
  color: var(--ab-fg);
}

.ab-trial-head h1 {
  color: var(--ab-fg);
  font: 500 clamp(26px, 2.6vw, 34px) / 1.1 "Iowan Old Style", Georgia, serif;
  letter-spacing: -0.03em;
}

.ab-trial-head h1 span {
  display: block;
  margin-top: 0.35rem;
  color: var(--ab-fg2);
  font: 400 16px / 1.35 var(--font-text-variant, Space, Arial, sans-serif);
  letter-spacing: 0;
}

.ab-trial-head .ab-kicker {
  margin: 0.7rem 0 0.9rem;
}

.ab-trial-head .ab-kicker > span:last-child {
  color: var(--ab-mute);
}

.ab-models-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
}

.ab .ab-models-row .ab-model {
  gap: 0.2rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--ab-edge);
}

.ab .ab-models-row .ab-model[aria-selected="true"] {
  border-color: var(--ab-fg);
  box-shadow: inset 0 0 0 0.5px var(--ab-fg);
}

.ab-trial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.ab-trial-lower {
  margin-top: 1.6rem;
  gap: 1rem 2.4rem;
}

.ab-box {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ab-edge);
  border-radius: 8px;
  background: #fff;
}

.ab-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2.9rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--ab-rule);
}

.ab-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  align-items: center;
}

.ab-check {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  color: var(--ab-fg);
  font-size: 13px;
  cursor: pointer;
}

.ab-check input {
  margin: 0;
  accent-color: var(--ab-fg);
}

.ab-check i,
.ab-map-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}

.ab-scale {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: var(--ab-mute);
  font-size: 12px;
}

.ab .ab-scale i {
  width: 5.5rem;
  height: 8px;
  border-radius: 4px;
}

.ab-trial-view {
  position: relative;
  aspect-ratio: 4 / 3;
}

.ab-trial-stage {
  position: absolute;
  inset: 0;
}

.ab-mol {
  display: flex;
}

.ab-mol-pane {
  position: relative;
  flex: 1;
  min-width: 0;
}

.ab-mol-split .ab-mol-pane + .ab-mol-pane {
  border-left: 1px solid var(--ab-rule);
}

.ab-mol-pane[data-label]::after {
  content: attr(data-label);
  position: absolute;
  top: 0.5rem;
  left: 0.7rem;
  color: var(--ab-mute);
  font-size: 12px;
  pointer-events: none;
}

/* Mol* draws inside its pane, without its own frame or its own buttons: the page's toolbar has what is needed */
.ab-mol .msp-viewport-controls {
  display: none;
}

.ab-mol .msp-plugin,
.ab-mol .msp-plugin .msp-layout-standard {
  border: 0;
}

.ab-card-foot {
  margin: 0;
  padding: 0.55rem 0.8rem 0.6rem;
  border-top: 1px solid var(--ab-rule);
  color: var(--ab-mute);
  font-size: 12.5px;
}

.ab-map-wrap {
  position: relative;
  margin: 0.8rem;
}

.ab-map {
  position: relative;
  aspect-ratio: 1;
  cursor: crosshair;
}

.ab-map canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.ab-map-corner {
  position: absolute;
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  background: color-mix(in srgb, #fff 82%, transparent);
  color: var(--ab-fg);
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
}

.ab-map-upper { top: 6px; right: 6px; }
.ab-map-lower { bottom: 6px; left: 6px; }

.ab-map-tip {
  position: absolute;
  z-index: 3;
  display: grid;
  width: max-content;
  max-width: 190px;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--ab-edge);
  border-radius: 5px;
  background: #fff;
  color: var(--ab-fg);
  font-size: 12px;
  pointer-events: none;
}

.ab-map-tip b {
  font-weight: 600;
}

.ab-map-tip span {
  color: var(--ab-mute);
}

.ab-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: center;
  padding: 0 0.8rem 0.75rem;
  color: var(--ab-mute);
  font-size: 12.5px;
}

.ab-map-legend > span {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.ab-map-what {
  margin-left: auto;
}

.ab-trial h2 {
  margin-bottom: 0.6rem;
  color: var(--ab-fg);
  font-size: 14px;
  font-weight: 600;
}

.ab-trial-account .ab-notes-text {
  max-width: none;
  margin-top: 0;
}

.ab-more-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--ab-fg2);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* the structure over the whole window */
.ab-noscroll {
  overflow: hidden;
}

.ab-box.ab-expanded {
  position: fixed;
  inset: 0.75rem;
  z-index: 50;
  box-shadow: 0 0 0 100vmax color-mix(in srgb, var(--ab-fg) 35%, transparent);
}

.ab-expanded .ab-trial-view {
  flex: 1;
  aspect-ratio: auto;
}

@media (max-width: 900px) {
  .ab-trial-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* a contact-map task: how many pairs to take, and the share of them that is right */
.ab-take {
  align-items: center;
}

.ab-take > span {
  color: var(--ab-mute);
  font-size: 13px;
}

.ab-precision {
  padding: 0 0.8rem 0.7rem;
}

.ab .ab-precision-plot {
  display: block;
  width: 100%;
  height: auto;
}

.ab-precision-grid {
  stroke: var(--ab-rule);
  stroke-width: 1;
  stroke-dasharray: 2 3;
}

.ab-precision-tick {
  fill: var(--ab-mute);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
