.chess-report {
  --learned: #a65a2a;
  --rope: #234a42;
  --cream: #f9edcb;
  --panel: #eef3ec;
  --chart-label: 3.4rem;
  --chart-score: 4.35rem;
  --chart-gap: .65rem;
  max-width: 48rem;
}
.chess-report h1 { max-width: 19ch; }
.chess-report h3 { margin-block: 1.5rem .55rem; font-size: 1.13rem; }
.takeaways { padding-left: 1.25rem; }
.takeaways li + li { margin-top: .35rem; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.1rem;
  list-style: none;
  margin: .65rem 0;
  padding: 0;
  color: var(--muted);
  font-size: .9rem;
}
.legend li { display: inline-flex; align-items: center; gap: .45rem; }
.legend li::before {
  width: 1.05rem;
  height: .25rem;
  border-radius: .1rem;
  background: var(--series);
  content: "";
}
.p-key { --series: var(--learned); }
.rope-key { --series: var(--rope); }
.coverage { margin-bottom: 1.3rem; }
.coverage-axis {
  display: flex;
  justify-content: space-between;
  margin-inline: calc(var(--chart-label) + var(--chart-gap)) calc(var(--chart-score) + var(--chart-gap));
  color: var(--muted);
  font-size: .8rem;
}
.coverage-rows { list-style: none; margin: .35rem 0 0; padding: 0; }
.coverage-rows > li {
  display: grid;
  grid-template-columns: var(--chart-label) minmax(0, 1fr);
  gap: var(--chart-gap);
  align-items: center;
  font-variant-numeric: tabular-nums;
}
.coverage-rows > li + li { margin-top: .6rem; }
.coverage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--chart-score);
  align-items: center;
  gap: var(--chart-gap);
  font-size: .9rem;
  text-align: right;
}
.coverage-bar { display: block; width: var(--width); height: 100%; background: var(--series); }
.coverage-row.rope-key { font-weight: 700; }
.results-table td { white-space: nowrap; }
.results-table caption span { display: block; color: var(--muted); font-weight: 400; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.network-flow { max-width: 36rem; margin: .9rem auto .1rem; }
.network-node {
  position: relative;
  padding: .55rem .8rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: .35rem;
}
.network-node > span, .network-pair span { display: block; font-size: .9rem; }
.network-flow > .network-node + .network-node { margin-top: 1.25rem; }
.network-flow > .network-node + .network-node::before {
  content: "↓";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1.25rem;
  color: var(--muted);
}
.network-block { background: var(--cream); }
.network-pair, .network-heads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.network-pair { border-top: 1px solid var(--line); margin-top: .45rem; padding-top: .45rem; }
.network-heads { position: relative; margin-top: 1.5rem; }
.network-heads::before {
  content: "";
  position: absolute;
  width: 50%;
  height: .7rem;
  left: 25%;
  top: -.75rem;
  border: 1px solid var(--line);
  border-bottom: 0;
}
.network-heads::after {
  content: "";
  position: absolute;
  top: -1.5rem;
  left: 50%;
  height: .75rem;
  border-left: 1px solid var(--line);
}
.equations {
  display: grid;
  gap: .55rem;
  padding: .8rem 1rem;
  border-left: 3px solid var(--sun);
  background: var(--cream);
}
.equations > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .15rem .6rem; }
.equations dt { font-weight: 700; }
.equations dd { margin: 0; display: flex; flex-wrap: wrap; gap: .1rem .95rem; }
.equations dd span { white-space: nowrap; }
.curve-legend .train-key::before { background: none; height: 0; border-top: 2px dashed var(--muted); }
.curve-legend .validation-key { --series: var(--muted); }
.training-charts { margin-top: .6rem; margin-bottom: .6rem; }
.training-charts figure { padding: .65rem; min-width: 0; }
.training-charts img { width: 100%; height: auto; display: block; }
.run-details { border-top: 1px solid var(--line); margin-top: 2rem; padding-top: .7rem; }
.run-details summary { cursor: pointer; font-weight: 700; }
.run-details li + li { margin-top: .35rem; }

@media (max-width: 32rem) {
  .chess-report { --chart-label: 2.7rem; --chart-score: 3.55rem; --chart-gap: .4rem; }
  .coverage { padding: .7rem; }
  .results-table { font-size: .79rem; }
  .results-table th, .results-table td { padding-inline: .2rem; }
  .network-node { padding-inline: .55rem; }
  .network-node > span, .network-pair span { font-size: .84rem; }
  .equations > div { grid-template-columns: 1fr; }
}
