/* w-softmax-explorer.css — classes for the softmax-explorer widget only. */

.w-softmax-explorer-right {
  display: flex; flex-direction: column; gap: 12px;
  padding: 46px 20px 18px;
}

.w-softmax-explorer-bin {
  display: grid; gap: 8px; padding: 12px 14px 12px; flex: 1 1 auto; align-content: center;
  border: 1px solid var(--line); border-radius: var(--r-s);
  background: rgba(8, 24, 36, 0.7);
  transition: border-color 140ms ease, background 140ms ease;
}
.w-softmax-explorer-bin:focus-visible { outline: 2px solid var(--cyan-bright); outline-offset: 2px; }
.w-softmax-explorer-bin.is-focus { background: rgba(14, 36, 52, 0.85); }
.w-softmax-explorer-bin--0.is-right { border-color: var(--hml-a); box-shadow: inset 0 0 0 1px var(--hml-a); }
.w-softmax-explorer-bin--1.is-right { border-color: var(--hml-b); box-shadow: inset 0 0 0 1px var(--hml-b); }
.w-softmax-explorer-bin--2.is-right { border-color: var(--hml-c); box-shadow: inset 0 0 0 1px var(--hml-c); }

.w-softmax-explorer-bin__head { display: flex; align-items: center; gap: 9px; }
.w-softmax-explorer-bin__name { font-weight: 700; font-size: 0.98rem; color: var(--text); }
.w-softmax-explorer-tag {
  display: none; padding: 1px 8px; border: 1px solid currentColor; border-radius: 99px;
  font-family: var(--mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
}
.w-softmax-explorer-bin.is-right .w-softmax-explorer-tag { display: inline-block; }
.w-softmax-explorer-bin--0 .w-softmax-explorer-tag { color: var(--hml-a); }
.w-softmax-explorer-bin--1 .w-softmax-explorer-tag { color: var(--hml-b); }
.w-softmax-explorer-bin--2 .w-softmax-explorer-tag { color: var(--hml-c); }

.w-softmax-explorer-line {
  display: grid; grid-template-columns: 82px minmax(0, 1fr) 54px; align-items: center; gap: 10px;
}
.w-softmax-explorer-line--prob { grid-template-columns: 82px minmax(0, 1fr) 54px 112px; }
.w-softmax-explorer-lab { color: var(--muted); font-size: 0.8rem; }
.w-softmax-explorer-val {
  font-family: var(--mono); font-size: 0.92rem; color: var(--soft); text-align: right; font-variant-numeric: tabular-nums;
}
.w-softmax-explorer-val--big { font-size: 1.12rem; color: var(--text); }

.w-softmax-explorer-bar {
  position: relative; display: block; height: 12px; border-radius: 99px; overflow: hidden;
  background: rgba(132, 194, 214, 0.14);
}
.w-softmax-explorer-bar--signed { height: 8px; }
.w-softmax-explorer-bar__zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--soft); z-index: 1; }
.w-softmax-explorer-bar__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; }
.w-softmax-explorer-bar--signed .w-softmax-explorer-bar__fill { border-radius: 2px; }
.w-softmax-explorer-k0 { background: var(--hml-a); }
.w-softmax-explorer-k1 { background: var(--hml-b); }
.w-softmax-explorer-k2 { background: var(--hml-c); }

.w-softmax-explorer-blame { display: flex; align-items: baseline; gap: 6px; justify-content: flex-start; white-space: nowrap; }
.w-softmax-explorer-blame__num { font-family: var(--mono); font-size: 0.82rem; color: var(--hml-blame); font-variant-numeric: tabular-nums; min-width: 5ch; text-align: right; }
.w-softmax-explorer-blame__words { color: var(--muted); font-size: 0.76rem; }

.w-softmax-explorer-math {
  margin-top: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: rgba(3, 11, 18, 0.6); font-size: 0.84rem; line-height: 1.75;
}
.w-softmax-explorer-math { white-space: normal; }
.w-softmax-explorer-tok { white-space: nowrap; }
.w-softmax-explorer-math sup { font-size: 0.72em; line-height: 0; }
.w-softmax-explorer-t0 { color: var(--hml-a); }
.w-softmax-explorer-t1 { color: var(--hml-b); }
.w-softmax-explorer-t2 { color: var(--hml-c); }
.w-softmax-explorer-pt { color: var(--gold); }
.w-softmax-explorer-who { font-weight: 600; }
.w-softmax-explorer-ghost { visibility: hidden; }

.w-softmax-explorer-ro--0 .hml-readout__value { color: var(--hml-a); }
.w-softmax-explorer-ro--1 .hml-readout__value { color: var(--hml-b); }
.w-softmax-explorer-ro--2 .hml-readout__value { color: var(--hml-c); }

.w-softmax-explorer-point { z-index: 3; width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.w-softmax-explorer-follow { min-width: 132px; }
.w-softmax-explorer-controls .hml-control { flex: none; max-width: none; min-width: 0; }

@media (max-width: 760px) {
  .w-softmax-explorer-right { padding: 44px 14px 14px; }
}
@media (max-width: 520px) {
  .w-softmax-explorer-line, .w-softmax-explorer-line--prob { grid-template-columns: 76px minmax(0, 1fr) 46px; gap: 8px; }
  .w-softmax-explorer-blame { grid-column: 2 / -1; }
  .w-softmax-explorer-blame__num { min-width: 0; text-align: left; }
  .w-softmax-explorer-who { display: block; }
  .w-softmax-explorer-ghost { display: none; }
  .w-softmax-explorer .hml-readouts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .w-softmax-explorer .hml-readouts .hml-readout { padding: 10px 12px; }
  .w-softmax-explorer .hml-readouts .hml-readout:last-child { grid-column: 1 / -1; }
  .w-softmax-explorer-math { font-size: 0.76rem; }
}
