.article-wrap .rail-desktop {
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}
.article-equation {
  margin: 1.6rem 0;
  overflow-x: auto;
  padding: .4rem 0;
  text-align: center;
}
.article-equation math {
  font-size: 1.25em;
}
.paper-figure {
  margin: 2rem 0;
}
.paper-figure-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  padding: .8rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.paper-figure-panels img,
.optimizer-comparison {
  width: 100%;
  height: auto;
  display: block;
}
.paper-figure figcaption {
  font-size: .87em;
  line-height: 1.5;
  margin: .7rem 0 0;
}
.article-data-table {
  width: 100%;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  border-collapse: collapse;
  margin: .8rem 0;
}
.article-data-table thead {
  background: var(--tint);
  color: var(--ink);
}
.article-data-table th[scope="row"],
.article-data-table th:first-child {
  text-align: left;
}
.article-table-wrap {
  overflow-x: auto;
  margin: 1.6rem 0;
}
.article-data-table td,
.article-data-table th {
  border-bottom: 1px solid var(--line);
  padding: .5rem .375rem;
  text-align: right;
  line-height: 1.4;
  font-size: .91em;
}
.article-data-table th[scope="row"] {
  font-weight: 500;
}
.article-data-table small {
  font-size: .8em;
  font-weight: 400;
}
.article-data-table caption {
  text-align: left;
  font-size: .85em;
  padding: 0 .375rem .35rem;
}
@media (max-width: 600px) {
  .paper-figure-panels {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  .article-data-table td,
  .article-data-table th {
    padding-inline: .2rem;
    font-size: .83em;
  }
}

figure.softmax-shift {
  color: var(--ink);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  box-sizing: border-box;
  margin: 2rem 0;
  padding: clamp(1rem, 3vw, 1.65rem);
  width: 100%;
  font-family: 'Geist', system-ui, sans-serif;
}

.softmax-shift > figcaption {
  color: var(--ink);
  font: 500 clamp(1.05rem, 2.5vw, 1.25rem)/1.35 'Geist', system-ui, sans-serif;
  margin: 0 0 1.2rem;
  text-align: left;
}

.softmax-shift .softmax-shift__control[hidden] { display: none; }
.softmax-shift .softmax-shift__control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin: 0 0 1rem;
  font-size: .92rem;
}
.softmax-shift__control label { font-weight: 500; }
.softmax-shift__control input {
  grid-column: 1/-1;
  width: 100%;
  min-height: 32px;
  margin: .2rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.softmax-shift__control input:hover { accent-color: var(--accent-hover); }
.softmax-shift__control input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.softmax-shift__range {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  color: var(--sub);
  font-size: .8125rem;
  line-height: 1;
}
.softmax-shift .softmax-shift__table {
  border-collapse: collapse;
  display: table;
  table-layout: fixed;
  margin: 0;
  width: 100%;
  font: 400 .92rem/1.3 'Geist', system-ui, sans-serif;
}
.softmax-shift__table th,
.softmax-shift__table td {
  padding: .6rem .65rem .6rem 0;
  vertical-align: middle;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.softmax-shift__table tr > :last-child { padding-right: 0; }
.softmax-shift__table thead th {
  color: var(--sub);
  font-size: .8125rem;
  font-weight: 500;
}
.softmax-shift__table thead th:first-child { width: 22%; }
.softmax-shift__table tbody th { font-weight: 500; }
.softmax-shift__metric { display: flex; flex-direction: column; gap: .32rem; }
.softmax-shift__value { font-variant-numeric: tabular-nums; }
.softmax-shift__logit, .softmax-shift__prob {
  display: block;
  height: 4px;
  width: 100%;
  background: var(--surface-strong);
  position: relative;
}
.softmax-shift__logit::after {
  content: '';
  position: absolute;
  left: 50%;
  height: 8px;
  top: -2px;
  border-left: 1px solid var(--sub);
}
.softmax-shift__logit > span, .softmax-shift__prob > span {
  display: block;
  height: 100%;
  position: absolute;
  background: var(--accent);
}
.softmax-shift__prob > span { background: var(--accent-hover); }
.softmax-shift > p:last-child {
  color: var(--sub);
  font: 400 .9rem/1.5 'Geist', system-ui, sans-serif;
  margin: .95rem 0 0;
}
