.addition-layout-table {
  margin: auto;
  border-spacing: 0;
  border-collapse: collapse;
  text-align: center;
}

.addition-layout-table td {
  padding: 4px;
  min-width: 18px;
}

.addition-layout-table .addition-line-cell {
  padding: 0;
}

.addition-line {
  border-top: 2px solid black;
  height: 0;
  width: 100%;
}

.carry-text {
  color: red;
  font-weight: bold;
}

.carry-number {
  color: red;
  font-weight: bold;
}

.subtraction-layout-table {
  margin: auto;
  border-spacing: 0;
  border-collapse: collapse;
  text-align: center;
}

.subtraction-layout-table td {
  padding: 4px;
  min-width: 18px;
  text-align: center;
  vertical-align: middle;
}

.subtraction-line-cell {
  padding: 0 !important;
}

.subtraction-line {
  border-top: 2px solid black;
  height: 0;
  width: 100%;
}

.borrow-text {
  color: red;
  font-weight: 700;
}

.borrow-number {
  color: #111;
  font-weight: 700;
}

.dash-number {
  color: #ef4444;
  text-decoration-line: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #ef4444;
}

s.dash-number {
  text-decoration-color: #ef4444;
  text-decoration-thickness: 2px;
}

.fraction-conversion-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.factor-stack {
  display: table;
  border-collapse: collapse;
  margin: auto;
}

.factor-row {
  display: table-row;
}

.factor-label,
.factor-list {
  display: table-cell;
  padding: 8px 14px;
  vertical-align: middle;
}

.factor-list {
  text-align: left;
  white-space: nowrap;
}

.factor-label {
  text-align: right;
  font-weight: 700;
  border-right: 2px solid black;
}

.factor-row:not(:last-child) .factor-label,
.factor-row:not(:last-child) .factor-list {
  border-bottom: 2px solid black;
}

.factor-plain,
.factor-best {
  color: #111;
  display: inline-block;
  margin-right: 12px;
}

.factor-plain:last-child,
.factor-best:last-child {
  margin-right: 0;
}

.factor-best {
  font-weight: 700;
  border: 2px solid #ef4444;
  border-radius: 999px;
  padding: 0 7px;
}

.division-layout-table {
  margin: auto;
  border-spacing: 0;
  border-collapse: collapse;
  text-align: center;
}

.division-layout-table td {
  padding: 4px;
  min-width: 18px;
}

.divisor-cell {
  border-right: 2px solid black;
  font-weight: 700;
}

.dividend-cell {
  border-top: 2px solid black;
}

.op-minus {
  font-weight: 700;
}

.product-cell {
  border-bottom: 1px solid black;
}