.study-figure .discrete-grid {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-variant-numeric: tabular-nums;
  background: var(--white);
}

.discrete-grid :is(th, td) {
  border: 1px solid var(--line);
  padding: .42em .35em;
}

.discrete-grid :is(thead, tfoot), .discrete-grid th[scope="row"] { background: #eee6d1; }
.discrete-grid .digit, .borrow-answer td { background: var(--yellow); font-weight: 800; }
.discrete-grid caption { text-align: start; padding-bottom: .35em; font-weight: 750; }
.binary-place-arrows td { height: 1.45em; }
.binary-place-arrows .flow-arrow { display: block; width: 1em; margin-inline: auto; rotate: 90deg; }

.radix-worked { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem; }
.radix-worked h3 { margin: 0 0 .55rem; }
.radix-division { display: grid; grid-template-columns: 1fr auto; gap: .55rem; }
.radix-read { display: flex; gap: .55rem; align-items: center; color: var(--teal); font-weight: 750; }
.radix-read .flow-arrow { width: 1.25rem; rotate: -90deg; }
.radix-result { margin: .55rem 0 0; }
.radix-block { display: inline-flex; border: 2px solid var(--ink); border-radius: 7px; overflow: hidden; }
.radix-block b { display: grid; place-items: center; width: 2.45em; min-height: 2.3em; background: var(--yellow); }
.radix-block b + b { border-left: 2px solid var(--ink); }
.radix-weight { margin: .45rem 0; }
.radix-token { display: flex; gap: .65rem; align-items: center; }
.radix-token .flow-arrow { width: 2rem; }
.radix-token strong { font-size: 1.25em; }
.radix-alphabet { margin: .5rem 0 0; }
.radix-inverse { border-top: 1px solid var(--line); padding-top: .5rem; margin: .8rem 0 0; }
.radix-inverse p { margin: 0 0 .35rem; }
.radix-inverse-map { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.radix-inverse-map span { background: var(--mint); padding-inline: .3em; white-space: nowrap; }
.radix-inverse-map .flow-arrow { width: 1.4rem; }

.borrow-grid :is(th, td) { width: 22%; }
.borrow-grid th:first-child { width: 34%; text-align: start; padding-inline-start: .7em; }
.borrow-send { position: relative; }
.borrow-send .flow-arrow { position: absolute; inset: 50% -21% auto 68%; width: auto; transform: translateY(-50%); }
.borrow-bundle, .borrow-unit {
  display: inline-flex;
  vertical-align: middle;
  margin: .12em;
  border: 2px solid var(--ink);
  border-radius: .3rem;
  background: var(--yellow);
}
.borrow-bundle { gap: .17rem; padding: .24rem; background: #fff1c4; }
.borrow-four { display: inline-grid; grid-template-columns: repeat(2, 1fr); }
.borrow-bundle i, .borrow-unit { width: .83rem; height: .83rem; }
.borrow-bundle i { border-radius: .14rem; background: var(--yellow); border: 1px solid var(--ink); }
.borrow-unit.removed { background: none; border-style: dashed; border-color: var(--wine); }

.discrete-search-key { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-bottom: .75rem; }
.discrete-search-key b { background: var(--mint); padding: .08em .34em; border-radius: 4px; }
.search-grid small { font-weight: 600; }
.search-grid :is(td, th).search-match { background: var(--mint); font-weight: 800; }
.discrete-search-result { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.discrete-search-result span { background: #eee6d1; padding: .36em .65em; border-radius: 5px; }
.discrete-search-result .flow-arrow { width: 1.65rem; }

@media (max-width: 700px) {
  .radix-worked { grid-template-columns: 1fr; gap: 1rem; }
  .search-grid { overflow-wrap: anywhere; }
}
